Playwright v1.42 #1408
Workflow file for this run
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: "CI" | |
on: | |
push: | |
branches: "*" | |
pull_request: | |
env: | |
cache-version: 1 | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup node" | |
uses: actions/setup-node@v4.0.2 | |
- name: "Cache NPM dependencies" | |
uses: actions/cache@v4 | |
with: | |
path: | | |
"~/.npm" | |
"~/.cache/puppeteer" | |
key: npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }} | |
restore-keys: | | |
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }} | |
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}- | |
- name: "Install NPM dependencies" | |
run: | | |
npm ci | |
- name: "Build" | |
run: | | |
npm run build | |
- name: "Upload artifact" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "docs" | |
path: docs | |
- name: Upload webpack stats artifact | |
uses: relative-ci/agent-upload-artifact-action@v1.0.3 | |
with: | |
webpackStatsFile: dist/webpack-stats.json | |
test: | |
name: "Test" | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4.1.1 | |
- name: "Cache NPM dependencies" | |
uses: actions/cache@v4.0.0 | |
with: | |
path: "~/.npm" | |
key: npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }} | |
restore-keys: | | |
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }} | |
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}- | |
- name: "Install NPM dependencies" | |
run: | | |
npm ci | |
- name: "Run tests" | |
run: | | |
npm run test | |
env: | |
HOME: /root | |
- name: "Upload coverage results" | |
uses: codecov/codecov-action@v4.1.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup node" | |
uses: actions/setup-node@v4.0.2 | |
- name: "Cache NPM dependencies" | |
uses: actions/cache@v4 | |
with: | |
path: | | |
"~/.npm" | |
"~/.cache/puppeteer" | |
key: npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }} | |
restore-keys: | | |
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }} | |
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}- | |
- name: "Install NPM dependencies" | |
run: | | |
npm ci | |
- name: "Lint" | |
run: | | |
npm run lint |