Skip to content
Latchkey

dev workflow (CesiumGS/cesium)

The dev workflow from CesiumGS/cesium, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get caching, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: CesiumGS/cesium.github/workflows/dev.ymlLicense Apache-2.0View source

What it does

This is the dev workflow from the CesiumGS/cesium repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: dev
on:
  push:
    branches:
      - main
  pull_request:
  merge_group:
concurrency:
  group: dev-${{ github.ref }}
  cancel-in-progress: true
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: install node 22
        uses: actions/setup-node@v6
        with:
          node-version: '22'
      - name: npm install
        run: npm install
      - name: lint *.js
        run: npm run eslint
      - name: lint *.md
        run: npm run markdownlint
      - name: format code
        run: npm run prettier-check
      - name: build
        run: npm run build
      - name: tsc
        run: npm run tsc
      - name: sg test
        run: npm exec --package=@ast-grep/cli --offline -- sg test
      - name: sg scan
        run: npm exec --package=@ast-grep/cli --offline -- sg scan --context 3
  coverage:
    runs-on: ubuntu-latest
    env:
      AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
      AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
      AWS_REGION: us-east-1
      BRANCH: ${{ github.ref_name }}
    steps:
      - uses: actions/checkout@v7
      - name: install node 22
        uses: actions/setup-node@v6
        with:
          node-version: '22'
      - name: npm install
        run: npm install
      - name: build
        run: npm run build
      - name: coverage (firefox)
        run: npm run coverage -- --browsers FirefoxHeadless --webgl-stub --failTaskOnError --suppressPassed
      - name: upload coverage artifacts
        if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
        run: aws s3 sync ./Build/Coverage s3://cesium-public-builds/cesium/$BRANCH/Build/Coverage --delete --color on
  release-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: install node 22
        uses: actions/setup-node@v6
        with:
          node-version: '22'
      - name: npm install
        run: npm install
      - name: release build
        run: npm run make-zip
      - name: release tests (chrome)
        run: npm run test -- --browsers ChromeHeadless --failTaskOnError --webgl-stub --release --suppressPassed
      - name: cloc
        run: npm run cloc
  node-smoke-test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        version: [22, 24]
    steps:
      - uses: actions/checkout@v7
      - name: install node ${{ matrix.version }}
        uses: actions/setup-node@v6
        with:
          node-version: ${{ matrix.version }}
      - name: npm install
        run: npm install
      - name: release build
        run: npm run build-release
      - name: package cesium module
        run: npm pack &> /dev/null
      - name: package workspace modules
        run: npm pack --workspaces &> /dev/null
      - uses: ./.github/actions/verify-package

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: dev
on:
  push:
    branches:
      - main
  pull_request:
  merge_group:
concurrency:
  group: dev-${{ github.ref }}
  cancel-in-progress: true
jobs:
  lint:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v7
      - name: install node 22
        uses: actions/setup-node@v6
        with:
          cache: 'npm'
          node-version: '22'
      - name: npm install
        run: npm install
      - name: lint *.js
        run: npm run eslint
      - name: lint *.md
        run: npm run markdownlint
      - name: format code
        run: npm run prettier-check
      - name: build
        run: npm run build
      - name: tsc
        run: npm run tsc
      - name: sg test
        run: npm exec --package=@ast-grep/cli --offline -- sg test
      - name: sg scan
        run: npm exec --package=@ast-grep/cli --offline -- sg scan --context 3
  coverage:
    timeout-minutes: 30
    runs-on: latchkey-small
    env:
      AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
      AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
      AWS_REGION: us-east-1
      BRANCH: ${{ github.ref_name }}
    steps:
      - uses: actions/checkout@v7
      - name: install node 22
        uses: actions/setup-node@v6
        with:
          cache: 'npm'
          node-version: '22'
      - name: npm install
        run: npm install
      - name: build
        run: npm run build
      - name: coverage (firefox)
        run: npm run coverage -- --browsers FirefoxHeadless --webgl-stub --failTaskOnError --suppressPassed
      - name: upload coverage artifacts
        if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
        run: aws s3 sync ./Build/Coverage s3://cesium-public-builds/cesium/$BRANCH/Build/Coverage --delete --color on
  release-tests:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v7
      - name: install node 22
        uses: actions/setup-node@v6
        with:
          cache: 'npm'
          node-version: '22'
      - name: npm install
        run: npm install
      - name: release build
        run: npm run make-zip
      - name: release tests (chrome)
        run: npm run test -- --browsers ChromeHeadless --failTaskOnError --webgl-stub --release --suppressPassed
      - name: cloc
        run: npm run cloc
  node-smoke-test:
    timeout-minutes: 30
    runs-on: latchkey-small
    strategy:
      matrix:
        version: [22, 24]
    steps:
      - uses: actions/checkout@v7
      - name: install node ${{ matrix.version }}
        uses: actions/setup-node@v6
        with:
          cache: 'npm'
          node-version: ${{ matrix.version }}
      - name: npm install
        run: npm install
      - name: release build
        run: npm run build-release
      - name: package cesium module
        run: npm pack &> /dev/null
      - name: package workspace modules
        run: npm pack --workspaces &> /dev/null
      - uses: ./.github/actions/verify-package
 

What changed

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 4 jobs (5 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow