Skip to content

lc 73 GitHub actions #1

lc 73 GitHub actions

lc 73 GitHub actions #1

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 / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml: (Line: 39, Col: 31, Idx: 733) - (Line: 39, Col: 34, Idx: 736): While scanning a plain scalar, find unexpected ':'.
on:
push:
branches: [main]
pull_request:
env:
JWT_SECRET: "test-secret"
JWT_REFRESH_SECRET: "test-refresh"
JWT_EXPIRATION_TIME: "15min"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Display package.json
run: cat package.json
- name: Install dependencies
run: |
pnpm install
pnpm list
- name: Build
run: pnpm build
test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
test-type: [web, api, api:e2e]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Display package.json
run: cat package.json
- name: Install dependencies
run: |
pnpm install
pnpm list
- name: Run ${{ matrix.test-type }} tests
run: pnpm test:${{ matrix.test-type }}
playwright:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Display package.json
run: cat package.json
- name: Install dependencies
run: |
pnpm install
pnpm list
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: pnpm test:web:e2e