tridactyl/.github/workflows/e2e.yml

71 lines
2.2 KiB
YAML
Raw Normal View History

name: e2e
on:
push:
branches:
- 'master'
pull_request:
branches:
- '*'
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
# os: [ubuntu, macos, windows]
browser: [firefox]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@master
2020-05-27 16:50:36 +01:00
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
2020-05-27 15:53:11 +01:00
- name: Install deps and build extension
run: |
yarn install
yarn run build
- name: Install Firefox Dev Edition (Linux)
if: matrix.browser == 'firefox' && matrix.os == 'ubuntu'
run: |
sudo yarn global add get-firefox
get-firefox --platform linux --branch devedition --extract --target $HOME
echo "::add-path::$HOME/firefox"
- name: Install Firefox Dev Edition (MacOS)
if: matrix.browser == 'firefox' && matrix.os == 'macos'
run: |
brew cask --verbose --debug install homebrew/cask-versions/firefox-developer-edition
echo "::add-path::/Applications/Firefox Developer Edition.app/Contents/MacOS/"
- name: Install Firefox Dev Edition (Windows)
if: matrix.browser == 'firefox' && matrix.os == 'windows'
run: |
choco install firefox-dev --pre
echo "::add-path::C:\Program Files\Firefox Dev Edition"
- name: Test (Firefox)
if: matrix.browser != 'chrome'
env:
HEADLESS: 1
run: |
yarn make-zip
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 }}
# - name: Test (Chrome, Windows/MacOs)
# if: matrix.browser == 'chrome' && matrix.os != 'ubuntu'
# run: npm run jest -- ${{ matrix.browser }} || npm run jest -- ${{ matrix.browser }}