Skip to content

feat: extend github actions workflow and undo playwright workaround #5

feat: extend github actions workflow and undo playwright workaround

feat: extend github actions workflow and undo playwright workaround #5

Workflow file for this run

name: Ensure necessary software quality gates
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build application
run: pnpm build
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Check with linter
run: pnpm lint
- name: Check with prettier
run: pnpm prettier:check
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Run unit tests
run: pnpm test:unit
test-e2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.43.0-jammy-amd64@sha256:e72111f8087db497b3b7d6b777864cf28270ebef3d001fabe384f4249992179d
env:
HOME: /root
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build application
run: pnpm build
- name: Run Playwright tests
run: pnpm test:e2e
env:
NEXTAUTH_URL: http://localhost:3000
SHIBBOLETH_OIDC_ISSUER_URL: https://sso.hm.edu
SHIBBOLETH_OIDC_SCOPE: openid
NEXTAUTH_SECRET: topsecret
SHIBBOLETH_OIDC_CLIENT_ID: ${{ secrets.OIDC_CLIENT_ID }}
SHIBBOLETH_OIDC_CLIENT_SECRET: ${{ secrets.OIDC_CLIENT_SECRET }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: test-results/
retention-days: 30
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30