-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (63 loc) · 2.1 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches-ignore:
- "mark-version-*-as-released"
jobs:
ci:
runs-on: ubuntu-latest
name: Build and run tests
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build solution
run: dotnet build BDMS.sln -c Release /warnaserror
- name: Start db and api's
run: docker compose up --wait minio db api-legacy api
- name: Run dotnet tests
run: dotnet test BDMS.sln -c Release --no-build --verbosity normal --filter TestCategory!=LongRunning
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- working-directory: ./src/client
run: npm ci
- working-directory: ./src/client
run: npm run lint
cypress-tests:
runs-on: ubuntu-latest
name: Run cypress tests
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build solution
run: dotnet build BDMS.sln -c Release /warnaserror
- name: Start db and api's
run: docker compose up --wait minio db api-legacy api oidc-server
- working-directory: ./src/client
run: npm ci
- name: Cypress run
uses: cypress-io/github-action@v6
with:
command: npx cypress run --record --parallel --key ${{ secrets.CYPRESS_RECORD_KEY }} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}}
build: npm run build
start: npm start
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
working-directory: ./src/client
env:
REACT_APP_VERSION: 0.0.99+dev
TZ: Europe/Zurich
# Pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}