commit 5f470bf107d00f5a46daf6639b3639d12b1a2e05 parent 3cb8ce873d6eeed6ebfb53c2aa46cafb181a2efb Author: Sergey Orlov <wladimirych@gmail.com> Date: Sat, 1 May 2021 15:13:00 +0300 tests: run tests on old firefox version Diffstat:
M | .browserslistrc | | | 4 | ++-- |
M | .github/workflows/main.yml | | | 35 | ++++++++++++++++++++++++++++++----- |
2 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/.browserslistrc b/.browserslistrc @@ -1,6 +1,6 @@ -[production] +[production testing] >0% -[development testing] +[development] last 2 chrome version last 2 firefox version diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: test +name: check on: push: @@ -8,19 +8,44 @@ on: - cron: '15 3 * * *' jobs: - build: + static: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: cp src/secrets.js.template src/secrets.js + - run: yarnpkg + + - run: npm run lint:code + - run: npm run lint:style + - run: npm run build + + test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: include: - browser: FirefoxHeadless + firefox-version: '52.9.0esr' + needs-xvfb: true + - browser: FirefoxHeadless - browser: ChromeHeadless steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - run: cp src/secrets.js.template src/secrets.js - run: yarnpkg - - run: npm run lint:code - - run: npm run lint:style + + - name: install specific version of Firefox + uses: browser-actions/setup-firefox@latest + with: + firefox-version: ${{matrix.firefox-version}} + if: matrix.firefox-version - run: npm run test -- --browsers ${{matrix.browser}} - - run: npm run build + if: ${{! matrix.needs-xvfb}} + - name: run tests with xvfb + uses: GabrielBB/xvfb-action@v1 + with: + run: npm run test -- --browsers ${{matrix.browser}} + if: matrix.needs-xvfb