-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.69 KB
/
cypress-tester.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Cypress-tester
on:
workflow_call:
secrets:
READER_TOKEN:
required: true
jobs:
test:
name: Cypress-tester
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ci_index: [0, 1, 2, 3]
ci_total: [4]
steps:
- name: Hente kode
uses: actions/checkout@v4
- name: Setup .yarnrc.yml
run: |
yarn config set npmScopes.navikt.npmRegistryServer "https://npm.pkg.github.com"
yarn config set npmScopes.navikt.npmAlwaysAuth true
yarn config set npmScopes.navikt.npmAuthToken $NPM_AUTH_TOKEN
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Sette opp Node
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: https://npm.pkg.github.com/
scope: '@navikt'
- name: Installere moduler
run: yarn install --immutable
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Start E2E-server
uses: cypress-io/github-action@v6
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
with:
start: yarn start:e2e
wait-on: 'http://localhost:8080'
wait-on-timeout: 60
runTests: false
- run: node split.mjs | xargs yarn cypress run --spec
env:
CI_TOTAL: ${{ matrix.ci_total }}
CI_INDEX: ${{ matrix.ci_index }}