Skip to content

add e2e test to ci

add e2e test to ci #20

Workflow file for this run

name: Weather App CI
env:
NODE_VERSION: 18.14.0
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node18.12.0-chrome107
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{env.NODE_VERSION}}
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm start &
- run: npx uuv e2e --generateHtmlReport
- run: npm run build --if-present -- --base-href=/weather-app/
- name: Upload build artifact
uses: actions/upload-pages-artifact@main
with:
name: github-pages
path: dist/weather-app
publish:
if: github.ref == 'refs/heads/main'
needs: [ build ]

Check failure on line 37 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / Weather App CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 37, Col: 14): Job 'publish' depends on unknown job 'build'.
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2