Build and test from trigger push #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
run-name: Build and test from trigger ${{ github.event_name }} | |
on: [workflow_call, push, pull_request] | |
env: | |
CI: true | |
TZ: Europe/Oslo | |
jobs: | |
build-and-test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
packages: "read" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@navikt' | |
- name: Install dependencies | |
run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build with mock | |
run: npm run build:mock | |
- uses: cypress-io/[email protected] | |
with: | |
install: false | |
spec: cypress/e2e/*.cy.js | |
start: npm run start:with:test | |
wait-on: 'http://localhost:3100/sendinn/api/isAlive' | |
config: video=false | |
config-file: cypress.config.ts | |