Skip to content

lc 73 GitHub actions #3

lc 73 GitHub actions

lc 73 GitHub actions #3

Workflow file for this run

name: CI
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"]
# 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:
name: "Playwright Tests"
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.46.0-jammy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Run your tests
run: npx playwright test
env:
HOME: /root