Skip to content

Commit

Permalink
Added a GitHub action to run tests in PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
wknapik committed Oct 31, 2023
1 parent 7120468 commit fe7f575
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: pr

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
pr:
name: pr
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- name: install dependencies
run: |
shopt -s inherit_errexit
set -xeEo pipefail

export DEBIAN_FRONTEND=noninteractive
apt-get -qq update
apt-get -qq install curl
curl -fsSLo /usr/share/keyrings/brave-browser-nightly-archive-keyring.gpg https://brave-browser-apt-nightly.s3.brave.com/brave-browser-nightly-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-nightly-archive-keyring.gpg] https://brave-browser-apt-nightly.s3.brave.com/ stable main" >/etc/apt/sources.list.d/brave-browser-nightly.list
apt-get -qq update
apt-get -qq --no-install-recommends install brave-browser-nightly

- name: test
run: |
shopt -s inherit_errexit
set -xeEo pipefail

sed -i 's,pagegraph:.*,pagegraph: "/usr/bin/brave-browser-nightly",' test/config.js
npm install
npm run test
2 changes: 1 addition & 1 deletion test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export const config = {
debug: false,
port: 3000,
baseUrl: 'http://localhost',
pagegraph: '/Applications/Brave\\ Browser\\ Nightly.app/Contents/MacOS/Brave\\ Browser\\ Nightly'
pagegraph: "/opt/brave.com/brave-nightly/brave-browser-nightly"
}

0 comments on commit fe7f575

Please sign in to comment.