Skip to content

Commit 8ddaaf4

Browse files
committed
Update CI to run unit tests
1 parent a8df9ec commit 8ddaaf4

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.gitlab-ci.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,32 @@ stages:
22
- build
33
- test
44

5+
run_unit_tests:
6+
image: docker-registry.ebrains.eu/model-catalog/node:22-alpine
7+
stage: test
8+
rules:
9+
- changes:
10+
- apps/model_catalog/**/*
11+
- .gitlab-ci.yml
12+
script:
13+
- cd apps/model_catalog
14+
- npm ci --legacy-peer-deps
15+
- npm run test
16+
tags:
17+
- docker-runner
18+
519
run_cypress_tests:
620
image: cypress/browsers:node12.14.1-chrome85-ff81
721
stage: test
822
rules:
9-
- if: '$CI_COMMIT_REF_NAME == "main"'
23+
- if: '$CI_COMMIT_REF_NAME == "staging"'
1024
changes:
11-
- apps/**/*
12-
rules:
13-
- changes:
14-
- apps/model_catalog/**/*
25+
- apps/model_catalog/**/*
26+
- .gitlab-ci.yml
1527
script:
1628
- cd apps/model_catalog
1729
# install dependencies
18-
- npm ci
30+
- npm ci --legacy-peer-deps
1931
# start server and run Cypress tests
2032
- npm run e2e:ci
2133
tags:

0 commit comments

Comments
 (0)