BlueGit

timfa raytracer

Files

raytracer / blue-ci-cd.yml

blue-ci-cd.yml

blue-ci-cd.yml 1001 B Download Raw
1# BlueGit CI for raytracer: build game.js + editor.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/editor.js
28 - test -f build/framework.js
29 - test -f build/index.html
30 - test -f build/editor.html
31 - test -f build/levels.json
32 artifacts:
33 paths:
34 - build/game.js
35 - build/editor.js
36 - build/index.html
37 - build/editor.html
38 - build/framework.js
39 - build/levels.json
40 expire_in: 7d