Skip to content

Kan attestere brev fra frontend #586

Kan attestere brev fra frontend

Kan attestere brev fra frontend #586

name: "verify: skribenten-web"
on:
pull_request:
branches:
- 'main'
paths:
- .github/workflows/verify-skribenten-web.yaml
- skribenten-web/**
jobs:
verify-bff:
name: Verify bff tests, lint and typescript errors
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: https://npm.pkg.github.com/
scope: '@navikt'
- name: Install bff dependencies
working-directory: skribenten-web/bff
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Run ESLint
working-directory: skribenten-web/bff
run: npm run lint
- name: Check for typescript errors
working-directory: skribenten-web/bff
run: npm run check-types
- name: Build bff
working-directory: skribenten-web/bff
run: npm run build
verify-frontend:
name: Verify frontend tests, lint and typescript errors
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: skribenten-web/frontend
- name: Install dependencies
working-directory: skribenten-web/frontend
run: npm ci
- name: Cypress run e2e tests
uses: cypress-io/github-action@v6
with:
working-directory: skribenten-web/frontend
install: false
browser: chrome
component: false
start: npm run dev
- name: Cypress run component tests
uses: cypress-io/github-action@v6
with:
working-directory: skribenten-web/frontend
install: false
browser: chrome
component: true
start: npm run cypress
- name: Run tests
working-directory: skribenten-web/frontend
run: npm run test
- name: Run ESLint
working-directory: skribenten-web/frontend
run: npm run lint
- name: Run stylelint
working-directory: skribenten-web/frontend
run: npm run stylelint
- name: Check for typescript errors
working-directory: skribenten-web/frontend
run: npm run check-types
- name: Upload failed Cypress screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: skribenten-web/frontend/cypress/screenshots