From f02fc9ac86bb1cf2fd3644c107f6c425f7bd1b28 Mon Sep 17 00:00:00 2001 From: Jonathan Baldie Date: Thu, 23 Jul 2026 11:27:20 +0100 Subject: [PATCH 1/3] ci: migrate to GitHub Actions --- .circleci/config.yml | 82 -------------------------- .dockerignore | 2 +- .github/workflows/ci.yml | 86 ++++++++++++++++++++++++++++ .serena/memories/project/overview.md | 4 +- .serena/project.yml | 77 ++++++++++++++----------- AGENTS.md | 13 +++-- README.md | 2 +- 7 files changed, 139 insertions(+), 127 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..8259abf 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,5 +4,5 @@ tests/ CLAUDE.md README.md .gitignore -.circleci/ +.github/ LICENSE diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f9a9e10 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,86 @@ +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 + with: + fetch-depth: 0 + - 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 + with: + fetch-depth: 0 + - 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 + with: + fetch-depth: 0 + - 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/.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/.serena/project.yml b/.serena/project.yml index 208ffdb..c264f02 100644 --- a/.serena/project.yml +++ b/.serena/project.yml @@ -1,41 +1,6 @@ # the name by which the project can be referenced within Serena/when chatting with the LLM. project_name: "queue" -# list of languages for which language servers are started (LSP backend only); choose from: -# ada al angular ansible bash -# bsl clojure cpp cpp_ccls crystal -# csharp csharp_omnisharp cue dart elixir -# elm erlang fortran fsharp gdscript -# go groovy haskell haxe hlsl -# html java json julia kotlin -# latex lean4 lua luau markdown -# matlab msl nix ocaml pascal -# perl php php_phpactor php_phpantom powershell -# python python_jedi python_pyrefly python_ty r -# rego ruby ruby_solargraph rust scala -# scss solidity svelte swift systemverilog -# terraform toml typescript typescript_vts vue -# yaml zig -# (This list may be outdated; generated with scripts/print_language_list.py; -# For the current list, see values of Language enum here: -# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py) -# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.) -# Note: -# - For C, use cpp -# - For JavaScript, use typescript -# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root) -# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm) -# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three) -# - For Free Pascal/Lazarus, use pascal -# Special requirements: -# Some languages require additional setup/installations. -# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers -# When using multiple languages, the first language server that supports a given file will be used for that file. -# The first language is the default language and the respective language server will be used as a fallback. -# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. -languages: -- typescript - # the encoding used by text files in the project # For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings encoding: "utf-8" @@ -63,6 +28,13 @@ ls_specific_settings: {} # list of additional paths to ignore in this project. # Same syntax as gitignore, so you can use * and **. +# Important: quote patterns that start with `*`, otherwise YAML treats them as aliases. +# Example: +# ignored_paths: +# - "examples/**" +# - ".worktrees/**" +# - "**/bin/**" +# - "**/obj/**" # Note: global ignored_paths from serena_config.yml are also applied additively. ignored_paths: [] @@ -158,3 +130,38 @@ ls_additional_workspace_folders: [] # - "./subproject2" ls_workspace_folders: - . + +# list of language servers to start when using the LSP backend; choose from: +# ada al angular ansible bash +# bsl clojure cpp cpp_ccls crystal +# csharp csharp_omnisharp cue dart elixir +# elm erlang fortran fsharp gdscript +# go groovy haskell haxe hlsl +# html java json julia kotlin +# latex lean4 lua luau markdown +# matlab msl nix ocaml pascal +# perl php php_phpactor php_phpantom powershell +# python python_jedi python_pyrefly python_ty r +# rego ruby ruby_solargraph rust scala +# scss solidity svelte swift systemverilog +# terraform toml typescript typescript_vts vue +# yaml zig +# (This list may be outdated; generated with scripts/print_language_list.py; +# For the current list, see values of Language enum here: +# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py) +# For some languages, there are several alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.) +# Note: +# - For C, use cpp +# - For JavaScript, use typescript +# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root) +# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm) +# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three) +# - For Free Pascal/Lazarus, use pascal +# Special requirements: +# Some language servers require additional setup/installations. +# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers +# When using multiple language servers, the first language server that supports a given file will be used for that file. +# The first language server is the default language and the respective language server will be used as a fallback. +# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. +language_servers: +- typescript diff --git a/AGENTS.md b/AGENTS.md index 8f180bc..d8b5151 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 @@ -57,7 +58,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) Using 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 From 1bd5b7e4aad178ee4255f821a3ece24de14f39aa Mon Sep 17 00:00:00 2001 From: Jonathan Baldie Date: Thu, 23 Jul 2026 11:31:43 +0100 Subject: [PATCH 2/3] ci: avoid duplicate pull request runs --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9a9e10..4a8e3e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,20 @@ name: CI on: push: + branches: + - main + - "release/**" + tags: + - "v*" pull_request: permissions: contents: read +concurrency: + group: ci-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: test: name: Test From c43cca94b71682312c7451c601d4c810ee2a1054 Mon Sep 17 00:00:00 2001 From: Jonathan Baldie Date: Thu, 23 Jul 2026 11:35:13 +0100 Subject: [PATCH 3/3] ci: use Node 24 GitHub actions --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a8e3e6..fa8fc5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Deno @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Deno @@ -75,11 +75,11 @@ jobs: timeout-minutes: 30 steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: 22 - name: Set up Deno