From 6f4163631639d5e81b99389ae22815c3e8c56556 Mon Sep 17 00:00:00 2001 From: Jonathan Baldie Date: Thu, 16 Jul 2026 20:56:01 +0100 Subject: [PATCH] ci: migrate CircleCI to GitHub Actions --- .circleci/config.yml | 82 ---------------------------- .dockerignore | 2 +- .github/workflows/ci.yml | 80 +++++++++++++++++++++++++++ .gitignore | 1 + .serena/memories/project/overview.md | 4 +- AGENTS.md | 13 +++-- README.md | 2 +- 7 files changed, 92 insertions(+), 92 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index b9e43f2..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,82 +0,0 @@ -version: 2.1 - -jobs: - test: - docker: - - image: denoland/deno:2.7.6 - steps: - - run: - name: Install git - command: apt-get update -yqq && apt-get install -yqq git - - run: - name: Checkout code via HTTPS - command: | - git clone https://github.com/jonbaldie/queue.git . - git checkout "${CIRCLE_SHA1}" - - run: - name: Build and run tests - command: | - touch persist.dat - deno compile --allow-read --allow-write=./persist.dat --allow-net=0.0.0.0:3000 --allow-env=HOST,PORT,PERSIST,QUEUE_API_TOKEN main.ts - deno test --allow-read --allow-write --allow-net --allow-env --allow-run - - mutation-mutasaurus: - docker: - - image: denoland/deno:2.7.6 - steps: - - run: - name: Install git - command: apt-get update -yqq && apt-get install -yqq git - - run: - name: Checkout code via HTTPS - command: | - git clone https://github.com/jonbaldie/queue.git . - git checkout "${CIRCLE_SHA1}" - - run: - name: Run mutasaurus mutation testing - command: | - touch persist.dat - deno run \ - --allow-read --allow-write --allow-net --allow-env \ - --allow-run --allow-sys --allow-ffi \ - --node-modules-dir=auto \ - mutation/mutasaurus_ci.ts - - mutation-stryker: - docker: - - image: node:22-slim - steps: - - run: - name: Install git and Deno - command: | - apt-get update -yqq && apt-get install -yqq git curl unzip procps - curl -fsSL https://deno.land/install.sh | sh - echo 'export DENO_INSTALL="/root/.deno"' >> $BASH_ENV - echo 'export PATH="$DENO_INSTALL/bin:$PATH"' >> $BASH_ENV - - run: - name: Checkout code via HTTPS - command: | - git clone https://github.com/jonbaldie/queue.git . - git checkout "${CIRCLE_SHA1}" - - run: - name: Install StrykerJS - command: npm install --save-dev @stryker-mutator/core - - run: - name: Run StrykerJS mutation testing - no_output_timeout: 25m - command: | - touch persist.dat - source $BASH_ENV - npx stryker run mutation/stryker.config.json - node mutation/stryker_check.js - -workflows: - test: - jobs: - - test - - mutation-mutasaurus: - requires: - - test - - mutation-stryker: - requires: - - mutation-mutasaurus diff --git a/.dockerignore b/.dockerignore index 0507113..7fa4357 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,5 +4,5 @@ tests/ CLAUDE.md README.md .gitignore -.circleci/ LICENSE +.github/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..41d2e7d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,80 @@ +name: CI + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Set up Deno + uses: denoland/setup-deno@v2 + with: + deno-version: 2.7.6 + - name: Build executable + run: | + touch persist.dat + deno compile \ + --allow-read \ + --allow-write=./persist.dat \ + --allow-net=0.0.0.0:3000 \ + --allow-env=HOST,PORT,PERSIST,QUEUE_API_TOKEN \ + main.ts + - name: Run tests + run: deno test --allow-read --allow-write --allow-net --allow-env --allow-run + + mutation-mutasaurus: + name: Mutation testing (Mutasaurus) + needs: test + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Set up Deno + uses: denoland/setup-deno@v2 + with: + deno-version: 2.7.6 + - name: Run Mutasaurus + run: | + touch persist.dat + deno run \ + --allow-read \ + --allow-write \ + --allow-net \ + --allow-env \ + --allow-run \ + --allow-sys \ + --allow-ffi \ + --node-modules-dir=auto \ + mutation/mutasaurus_ci.ts + + mutation-stryker: + name: Mutation testing (Stryker) + needs: mutation-mutasaurus + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Set up Deno + uses: denoland/setup-deno@v2 + with: + deno-version: 2.7.6 + - name: Install StrykerJS + run: npm install --no-save --no-package-lock @stryker-mutator/core + - name: Run StrykerJS + run: | + touch persist.dat + npx --no-install stryker run mutation/stryker.config.json + node mutation/stryker_check.js diff --git a/.gitignore b/.gitignore index cf5bd69..7d04ec6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ /target/ /node_modules/ /.stryker-tmp/sandbox-*/ +mutation/stryker-report.json /.claude/ CLAUDE.md diff --git a/.serena/memories/project/overview.md b/.serena/memories/project/overview.md index 6bcf87a..7676bb9 100644 --- a/.serena/memories/project/overview.md +++ b/.serena/memories/project/overview.md @@ -4,10 +4,10 @@ Fast, lightweight, persistence-optional FIFO queue service written in TypeScript for Deno. Provides HTTP API for enqueue, dequeue, length, peek, queues list, and health check endpoints. ## Tech Stack -- **Runtime**: Deno 2.7.6 (critical - must match CI image) +- **Runtime**: Deno 2.7.6 (critical - must match the GitHub Actions workflow) - **Language**: TypeScript - **Imports**: JSR format (e.g. `jsr:@std/cli@1.0/parse-args`) -- **CI**: CircleCI (image: `denoland/deno:2.7.6`) +- **CI**: GitHub Actions (`.github/workflows/ci.yml`) ## Commands - **Test**: `deno test --allow-all` (permission flags required for file I/O tests) diff --git a/AGENTS.md b/AGENTS.md index f4c3a10..aea13e6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,15 +14,16 @@ and respect .serena as integral project tooling **Main branch requires Deno 2.7.6** -### CircleCI Configuration +### GitHub Actions Configuration -The `.circleci/config.yml` must match the Deno version: +The `.github/workflows/ci.yml` must match the Deno version: ```yaml -docker: - - image: denoland/deno:2.7.6 +uses: denoland/setup-deno@v2 +with: + deno-version: 2.7.6 ``` -**If you upgrade Deno, ALWAYS update this image or CI will fail.** +**If you upgrade Deno, ALWAYS update this workflow or CI will fail.** ### Standard Library Imports @@ -61,7 +62,7 @@ Test HTTP handler behaviour with real requests, not internal implementation deta ## Common Diagnostics -**CircleCI fails?** Check: (1) CircleCI Deno version matches code (2) Import format (jsr: vs deno.land) (3) Using Deno 2.x-only APIs +**GitHub Actions fails?** Check: (1) workflow Deno version matches code (2) import format (jsr: vs deno.land) (3) use of Deno 2.x-only APIs **Merge blocked?** `gh api repos/jonbaldie/queue/branches/main/protection --jq '.enforce_admins.enabled'` — if true, disable with DELETE before merging with --admin diff --git a/README.md b/README.md index 16aa4e8..db8e995 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Fast, portable queue server written in Typescript and built with Deno. -[![CircleCI](https://circleci.com/gh/jonbaldie/queue/tree/main.svg?style=shield)](https://circleci.com/gh/jonbaldie/queue/tree/main) +[![CI](https://github.com/jonbaldie/queue/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jonbaldie/queue/actions/workflows/ci.yml) ## Introduction