Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8d43ddb
chore: add @actions/core to interface with GitHub Actions
ben-laird Nov 19, 2025
a354a7c
feat(infra/actions): add initial deno script
ben-laird Nov 19, 2025
7bc40f6
ci(infra/actions): add deno CI test run action
ben-laird Nov 19, 2025
f5bb9ac
ci: ensure test run ci only runs in the current branch
ben-laird Nov 19, 2025
01ac706
refactor(infra/actions): try CI detection
ben-laird Nov 19, 2025
2464c9f
refactor(infra/actions): fix CI detection to actually choose a branch…
ben-laird Nov 19, 2025
f11e033
feat(scripts/ci): add new workflow API
ben-laird Nov 20, 2025
25684c4
chore(config/deno): add ci permission set
ben-laird Nov 20, 2025
89071ef
chore(deps): update lockfile
ben-laird Nov 20, 2025
b555045
Revert "feat(scripts/ci): add new workflow API"
ben-laird Nov 20, 2025
c7df4e9
feat(scripts/ci): achieve near-feature-parity with original CI workflow
ben-laird Nov 20, 2025
5abba81
ci(scripts/ci): ensure script is run with correct permissions
ben-laird Nov 20, 2025
1f4ed58
fix(scripts/ci): ensure width is always calculated, even in CI
ben-laird Nov 20, 2025
db1bcf0
refactor(scripts/ci): move common command options to one dedicated ob…
ben-laird Nov 20, 2025
959c254
chore(deps): add @std/async
ben-laird Nov 20, 2025
a17c83a
fix(scripts/ci): wait a bit to go to the next command's output in CI
ben-laird Nov 20, 2025
d3d2565
ci(infra/actions): remove test run action
ben-laird Nov 20, 2025
8a9b545
ci(infra/actions): add main ci reusable workflow
ben-laird Nov 20, 2025
730d476
ci(infra/actions): use new reusable workflow to greatly simplify ci
ben-laird Nov 20, 2025
3fa979c
ci(infra/actions): add name to workflow call
ben-laird Nov 20, 2025
97c2463
ci(infra/actions): rename job
ben-laird Nov 20, 2025
59672aa
chore(deps): add @actions/github
ben-laird Nov 22, 2025
2e9cf2d
ci(scripts/clean-up-caches): add @encode/clean-up-caches
ben-laird Nov 22, 2025
e94fbd8
ci(actions/clean-up-caches): add action to clean caches
ben-laird Nov 22, 2025
0c4ef0e
ci(actions/clean-up-caches): fix insufficient permissions
ben-laird Nov 22, 2025
f107b65
ci(@encode/clean-up-caches): use Deno env instead of GitHub inputs
ben-laird Nov 22, 2025
4f6e85a
ci(actions/clean-up-caches): pass in token as env var
ben-laird Nov 22, 2025
f73b358
ci(actions/clean-up-caches): add permissions
ben-laird Nov 22, 2025
1e70958
ci(actions/clean-up-caches): add permissions everywhere needed
ben-laird Nov 22, 2025
e4bae13
ci(actions/clean-up-caches): remove actions/clean-up-caches
ben-laird Nov 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 5 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,91 +4,9 @@ on:
push:
pull_request:

env:
# Used to differentiate from other slices of the cache for other workflow runs, and to forcefully bust the cache when renamed
CACHE_KEY_BASE: ci@v1

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: 2.x
cache-hash: ${{ env.CACHE_KEY_BASE }}-${{ hashFiles('deno.lock') }}

- name: Install dependencies
run: deno install

test:
name: Test
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

# Now the Deno cache should be warmed up, so this should be much faster
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: 2.x
cache-hash: ${{ env.CACHE_KEY_BASE }}-${{ hashFiles('deno.lock') }}

- name: Test
run: deno test -P --no-prompt --coverage --shuffle

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
coverage/html
coverage/lcov.info

- name: Upload raw coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-report-raw
path: coverage/*.json

lint:
name: Lint
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

# Now the Deno cache should be warmed up, so this should be much faster
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: 2.x
cache-hash: ${{ env.CACHE_KEY_BASE }}-${{ hashFiles('deno.lock') }}

- name: Lint
run: deno run --allow-env --allow-run --no-prompt npm:@biomejs/biome ci

check:
name: Check
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

# Now the Deno cache should be warmed up, so this should be much faster
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: 2.x
cache-hash: ${{ env.CACHE_KEY_BASE }}-${{ hashFiles('deno.lock') }}

- name: Lint
run: deno check
run-procedure:
name: Run CI Procedure
uses: ./.github/workflows/fn-ci.yml
with:
cache-key-base: ci@v1
43 changes: 43 additions & 0 deletions .github/workflows/fn-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI Procedure

on:
workflow_call:
inputs:
cache-key-base:
description: A string used to differentiate from other slices of the cache for other workflow runs, and to forcefully bust the cache when renamed
type: string
required: true

jobs:
main-checks:
name: Main Checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: 2.x
cache-hash: ${{ inputs.cache-key-base }}-${{ hashFiles('deno.lock') }}

- name: Install dependencies
run: deno install

- name: Run main script
run: deno run -P=ci @encode/ci

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
coverage/html
coverage/lcov.info

- name: Upload raw coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-report-raw
path: coverage/*.json
15 changes: 11 additions & 4 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@
},

"imports": {
// Import alias
"@root/": "./",
// External dependencies
"@actions/core": "npm:@actions/core@^1.11.1",
"@actions/github": "npm:@actions/github@^6.0.1",
"@biomejs/biome": "npm:@biomejs/biome@2.3.6",
"@std/assert": "jsr:@std/assert@1.0.16",
"@std/async": "jsr:@std/async@^1.0.15",
"@std/testing": "jsr:@std/testing@1.0.16",
"@std/fmt": "jsr:@std/fmt@1.0.8",
"@std/cli": "jsr:@std/cli@1.0.24",
"@std/fs": "jsr:@std/fs@1.0.20",
"@std/path": "jsr:@std/path@1.1.3",
"chevrotain": "npm:chevrotain@^11.0.3"
"chevrotain": "npm:chevrotain@^11.0.3",

"@root/": "./"
},

"test": {
Expand All @@ -31,6 +33,11 @@
"biome": {
"env": true,
"run": true
},

"ci": {
"env": true,
"run": ["deno"]
}
},

Expand Down
Loading