e2e tests: rely on yarn to find web-ext and jest

This commit is contained in:
glacambre 2020-05-27 18:53:19 +02:00
parent 53b2746108
commit 7bc33c2645
2 changed files with 10 additions and 14 deletions

View file

@ -8,9 +8,6 @@ on:
branches:
- '*'
env:
HEADLESS: 1
jobs:
test:
strategy:
@ -57,19 +54,16 @@ jobs:
run: |
choco install firefox-dev --pre
echo "::add-path::C:\Program Files\Firefox Dev Edition"
- name: Build Tridactyl
- name: Pack Tridactyl
run: |
bash -c '"$(yarn bin)/web-ext" build --source-dir ./build --overwrite-dest'
yarn make-zip
mv web-ext-artifacts/*.zip web-ext-artifacts/tridactyl.xpi
- name: Test (Firefox)
if: matrix.browser != 'chrome'
env:
HEADLESS: 1
run: |
bash -c '"$(yarn bin)/jest" ||
"$(yarn bin)/jest" ||
"$(yarn bin)/jest" ||
"$(yarn bin)/jest"'
yarn jest || yarn jest || yarn jest || yarn jest
# - name: Test (Chrome, Linux)
# if: matrix.browser == 'chrome' && matrix.os == 'ubuntu'
# run: xvfb-run --auto-servernum npm run jest -- ${{ matrix.browser }} || xvfb-run --auto-servernum npm run jest -- ${{ matrix.browser }}

View file

@ -52,14 +52,16 @@
},
"scripts": {
"build": "sh scripts/build.sh",
"run": "web-ext run -s build/ -u 'txti.es'",
"forrest-run": "yarn run run",
"watch": "echo 'watch is broken, use build instead'; exit 0;",
"clean": "rm -rf build generated",
"forrest-run": "yarn run run",
"jest": "jest",
"lint": "bash hooks/pre-commit",
"make-zip": "web-ext build --source-dir build --overwrite-dest",
"pretty": "bash scripts/pretty.sh",
"run": "web-ext run -s build/ -u 'txti.es'",
"test": "yarn run build && rm -rf web-ext-artifacts/* && web-ext build --source-dir ./build --overwrite-dest && mv web-ext-artifacts/*.zip web-ext-artifacts/tridactyl.xpi && jest --silent",
"update-buildsystem": "rm -rf src/node_modules; yarn run clean",
"lint": "bash hooks/pre-commit",
"pretty": "bash scripts/pretty.sh"
"watch": "echo 'watch is broken, use build instead'; exit 0;"
},
"author": "Colin Caine",
"repository": {