tridactyl/.github/workflows/e2e.yml

106 lines
3.3 KiB
YAML
Raw Permalink Normal View History

name: e2e
on:
push:
branches:
- 'master'
paths-ignore:
- '/readme.md'
pull_request:
branches:
- '*'
paths-ignore:
- '/readme.md'
2020-07-19 13:39:56 +01:00
schedule:
- cron: '45 7 * * *'
concurrency:
group: e2e-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
2020-06-17 14:20:18 +01:00
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
2021-01-29 17:53:02 +01:00
os: [ubuntu, windows]
# os: [ubuntu, macos, windows]
2020-06-21 13:25:57 +01:00
browser: [firefox, firefoxesr]
exclude:
2023-03-02 17:15:19 +01:00
- os: windows
2020-06-21 13:25:57 +01:00
browser: firefoxesr
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v3
2020-05-27 16:50:36 +01:00
- name: Get yarn cache directory path
id: yarn-cache-dir-path
2023-01-15 22:47:39 +01:00
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
2020-05-27 16:50:36 +01:00
- name: Setup cache
uses: actions/cache@v3
2020-05-27 16:50:36 +01:00
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
2020-06-17 17:32:17 +01:00
- name: Install deps
2020-05-27 15:53:11 +01:00
run: |
yarn install
- 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
2020-11-18 14:27:51 +01:00
echo "$HOME/firefox" >> $GITHUB_PATH
2020-06-21 13:25:57 +01:00
- name: Install Firefox ESR (Linux)
if: matrix.browser == 'firefoxesr' && matrix.os == 'ubuntu'
run: |
sudo yarn global add get-firefox
get-firefox --platform linux --branch esr --extract --target $HOME
2020-11-18 14:27:51 +01:00
echo "$HOME/firefox" >> $GITHUB_PATH
- name: Install Firefox Dev Edition (MacOS)
if: matrix.browser == 'firefox' && matrix.os == 'macos'
run: |
2021-01-28 18:26:29 +01:00
brew install --cask homebrew/cask-versions/firefox-developer-edition
2020-11-18 14:27:51 +01:00
echo "/Applications/Firefox Developer Edition.app/Contents/MacOS/" >> $GITHUB_PATH
- name: Install Firefox Dev Edition (Windows)
if: matrix.browser == 'firefox' && matrix.os == 'windows'
run: |
choco install firefox-dev --pre
2020-11-18 14:27:51 +01:00
echo "C:\Program Files\Firefox Dev Edition" >> $GITHUB_PATH
2020-06-21 13:25:57 +01:00
- name: Install Firefox ESR (Windows)
if: matrix.browser == 'firefoxesr' && matrix.os == 'windows'
run: |
2020-06-21 13:33:21 +01:00
choco install firefoxesr
2020-11-18 14:27:51 +01:00
echo "C:\Program Files\Mozilla Firefox" >> $GITHUB_PATH
2020-06-17 15:36:36 +01:00
- name: Print Firefox version (Unix-like)
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
2020-06-21 13:33:47 +01:00
run: firefox --version
2020-06-17 17:32:17 +01:00
- name: Build and test (Firefox)
uses: nick-fields/retry@v2
if: matrix.browser != 'chrome'
env:
HEADLESS: 1
2020-06-17 14:20:18 +01:00
with:
max_attempts: 40
2020-06-17 14:20:18 +01:00
timeout_minutes: 10
2020-06-17 17:32:17 +01:00
retry_wait_seconds: 10
2023-01-15 20:05:38 +01:00
shell: bash
2020-06-17 17:32:17 +01:00
command: |
yarn run clean && yarn run build --old-native && yarn make-zip && 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 }}