# BlueGit CI for raytracer: build game.js bundle + node tests. stages: [test, build] workflow: rules: - if: $CI_COMMIT_TAG != "" when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH == "master" - if: $CI_COMMIT_BRANCH =~ /^feature\// unit_tests: stage: test image: node:20-bookworm script: - node --test test/*.test.js build_game: stage: build image: debian:bookworm-slim needs: [unit_tests] script: - apt-get update -qq && apt-get install -y -qq bash ca-certificates >/dev/null - chmod +x src/build.sh - ./src/build.sh - test -f build/game.js - test -f build/framework.js - test -f build/index.html artifacts: paths: [build/game.js, build/index.html, build/framework.js] expire_in: 7d