Skip to content

end to end testing

end to end testing #8

Workflow file for this run

name: CI

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

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 37, Col: 1): 'name' is already defined, (Line: 39, Col: 1): 'on' is already defined, (Line: 45, Col: 1): 'jobs' is already defined
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
web:
name: Web CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Run tests (Vitest)
run: npm run test:ci
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
name: Lint, Test & Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Type check
run: npx tsc --noEmit
- name: Run tests
run: npx vitest run
- name: Build
run: npm run build
env:
VITE_API_BASE_URL: https://zcloudpass-backend.onrender.com/api/v1