mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
105 lines
3.3 KiB
YAML
105 lines
3.3 KiB
YAML
name: e2e
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths-ignore:
|
|
- '/readme.md'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
paths-ignore:
|
|
- '/readme.md'
|
|
schedule:
|
|
- cron: '45 7 * * *'
|
|
|
|
concurrency:
|
|
group: e2e-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
timeout-minutes: 120
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu, windows]
|
|
# os: [ubuntu, macos, windows]
|
|
browser: [firefox, firefoxesr]
|
|
exclude:
|
|
- os: windows
|
|
browser: firefoxesr
|
|
|
|
runs-on: ${{ matrix.os }}-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
shell: bash
|
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Setup cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install deps
|
|
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
|
|
echo "$HOME/firefox" >> $GITHUB_PATH
|
|
- 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
|
|
echo "$HOME/firefox" >> $GITHUB_PATH
|
|
- name: Install Firefox Dev Edition (MacOS)
|
|
if: matrix.browser == 'firefox' && matrix.os == 'macos'
|
|
run: |
|
|
brew install --cask homebrew/cask-versions/firefox-developer-edition
|
|
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
|
|
echo "C:\Program Files\Firefox Dev Edition" >> $GITHUB_PATH
|
|
- name: Install Firefox ESR (Windows)
|
|
if: matrix.browser == 'firefoxesr' && matrix.os == 'windows'
|
|
run: |
|
|
choco install firefoxesr
|
|
echo "C:\Program Files\Mozilla Firefox" >> $GITHUB_PATH
|
|
|
|
- name: Print Firefox version (Unix-like)
|
|
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
|
|
run: firefox --version
|
|
|
|
- name: Build and test (Firefox)
|
|
uses: nick-fields/retry@v2
|
|
if: matrix.browser != 'chrome'
|
|
env:
|
|
HEADLESS: 1
|
|
with:
|
|
max_attempts: 40
|
|
timeout_minutes: 10
|
|
retry_wait_seconds: 10
|
|
shell: bash
|
|
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 }}
|