Skip to content

Part 6 pw

Part 6 pw #23

Workflow file for this run

name: PR Check
on:
pull_request:
branches:
- main
jobs:
test:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Generate environment.ts from secrets
shell: bash
run: |
cat > src/environments/environment.ts <<'EOF'
export const environment = {
production: false,
supabaseUrl: '${{ secrets.SUPABASE_URL }}',
supabaseKey: '${{ secrets.SUPABASE_ANON_KEY }}',
};
EOF
- name: Install dependencies
run: npm ci
- name: Run unit tests with headless Chrome
run: npm run test -- --browsers=ChromeHeadless --watch=false --no-progress