name: CI on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 # glslangValidator is Khronos' reference GLSL compiler. The shader tests compile # the game's real shaders with it; without it they skip, so install it explicitly. - name: Install GLSL compiler run: sudo apt-get update && sudo apt-get install -y glslang-tools - run: npm ci - name: Unit tests (shaders, terrain) run: npm test - name: Build run: npm run build - name: Basic syntax lint run: npm run lint:syntax # Needs a Chrome/Chromium binary and CPU-rendered WebGL (SwiftShader). Not every # runner has one, so this reports without blocking the pipeline. render: runs-on: ubuntu-latest continue-on-error: true steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 - name: Install Chromium run: sudo apt-get update && sudo apt-get install -y chromium - run: npm ci - name: Build run: npm run build - name: Headless render check run: CHROME=$(command -v chromium || command -v chromium-browser) npm run test:render