Skip to content

use short npm script names #40

use short npm script names

use short npm script names #40

name: Format Lint Test
on: [pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Build extension
run: npm run build
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run tests
run: npm run test
# Upload test results on failure
- uses: actions/upload-pages-artifact@v3
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
deploy:
if: needs.test.result == 'failure'
needs: build

Check failure on line 57 in .github/workflows/format-lint-test.yml

View workflow run for this annotation

GitHub Actions / Format Lint Test

Invalid workflow file

The workflow is not valid. .github/workflows/format-lint-test.yml (Line: 57, Col: 12): Job 'deploy' depends on unknown job 'build'.
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4