E2E On-demand Tests #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E On-demand Tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
inputs: | |
url: | |
description: 'Environment base URL' | |
required: true | |
default: 'http://eth.blockscout.com/' | |
env: | |
ENV: prod | |
BLOCKSCOUT_URL: ${{ inputs.url }} | |
jobs: | |
on_demand_test: | |
permissions: | |
id-token: write | |
contents: read | |
name: On-demand Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: v14.17.0 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install deps | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Cache playwright binaries | |
uses: actions/cache@v2 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-build-${{ env.cache-name }} | |
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }} | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
- name: Run playwright | |
run: | | |
npm run test:ondemand | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: report | |
path: tests/e2e/test-results | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./tests/e2e |