BlueGit

timfa raytracer

Files

raytracer / blue-ci-cd.yml

blue-ci-cd.yml

blue-ci-cd.yml 799 B Download Raw
1# BlueGit CI for raytracer: build game.js bundle + node tests.
2stages: [test, build]
3
4workflow:
5 rules:
6 - if: $CI_COMMIT_TAG != ""
7 when: never
8 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
9 - if: $CI_COMMIT_BRANCH == "master"
10 - if: $CI_COMMIT_BRANCH =~ /^feature\//
11
12unit_tests:
13 stage: test
14 image: node:20-bookworm
15 script:
16 - node --test test/*.test.js
17
18build_game:
19 stage: build
20 image: debian:bookworm-slim
21 needs: [unit_tests]
22 script:
23 - apt-get update -qq && apt-get install -y -qq bash ca-certificates >/dev/null
24 - chmod +x src/build.sh
25 - ./src/build.sh
26 - test -f build/game.js
27 - test -f build/framework.js
28 - test -f build/index.html
29 artifacts:
30 paths: [build/game.js, build/index.html, build/framework.js]
31 expire_in: 7d