Skip to content

Commit 590b9de

Browse files
xrendanclaude
andcommitted
🔧🤖 Update CI/CD for Bun monorepo
- Update ci.yml to use Bun instead of yarn - test, typecheck, and build jobs - Upload Storybook artifact on build - Update npm-publish.yml for multi-package publishing - Publish @buildcanada/charts and @buildcanada/colours - Support dry-run mode and package selection - Update codeql-analysis.yml for TypeScript only - Add setup-bun-deps reusable action - Remove obsolete OWID-specific workflows: - buildkite, prettify, sentry, stale, todo-checker - check-default-grapher-config, project-automations - sync-grapher-schema-to-r2, update-regions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f2faa89 commit 590b9de

File tree

14 files changed

+150
-494
lines changed

14 files changed

+150
-494
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Set up Bun and dependencies
2+
description: Runs all the setup steps required to have Bun and all dependencies installed
3+
inputs:
4+
bun-version:
5+
description: "Bun version to use"
6+
required: false
7+
default: "latest"
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Setup Bun
12+
uses: oven-sh/setup-bun@v2
13+
with:
14+
bun-version: ${{ inputs.bun-version }}
15+
16+
- name: Setup Node.js (for npm publish)
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "22"
20+
registry-url: "https://registry.npmjs.org"
21+
22+
- name: List versions
23+
run: |
24+
echo "Versions:"
25+
echo "Bun $(bun --version)"
26+
echo "Node $(node --version)"
27+
shell: bash
28+
29+
- name: Install dependencies
30+
run: bun install --frozen-lockfile
31+
shell: bash

‎.github/actions/setup-node-yarn-deps/action.yml‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

‎.github/workflows/buildkite.yml‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎.github/workflows/check-default-grapher-config.yml‎

Lines changed: 0 additions & 56 deletions
This file was deleted.

‎.github/workflows/ci.yml‎

Lines changed: 28 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,93 +2,60 @@ name: CI
22
on: [push, pull_request]
33

44
jobs:
5-
# Checks for prettify errors, TypeScript errors and runs vitest tests.
6-
"test-db":
5+
test:
76
runs-on: ubuntu-latest
8-
97
steps:
108
- name: Clone repository
119
uses: actions/checkout@v5
1210

13-
- uses: ./.github/actions/setup-node-yarn-deps
11+
- name: Setup Bun
12+
uses: oven-sh/setup-bun@v2
13+
with:
14+
bun-version: latest
1415

1516
- name: Install dependencies
16-
run: cp .env.example-grapher .env
17-
shell: bash
18-
19-
- name: Build and run db tests
20-
run: make dbtest
21-
timeout-minutes: 6
22-
23-
test:
24-
runs-on: ubuntu-latest
25-
26-
steps:
27-
- name: Clone repository
28-
uses: actions/checkout@v5
29-
30-
- uses: ./.github/actions/setup-node-yarn-deps
17+
run: bun install --frozen-lockfile
3118

32-
- name: Run vitest
33-
run: yarn test --pool=forks
19+
- name: Run tests
20+
run: bun run test
3421

3522
typecheck:
3623
runs-on: ubuntu-latest
37-
3824
steps:
3925
- name: Clone repository
4026
uses: actions/checkout@v5
4127

42-
- uses: ./.github/actions/setup-node-yarn-deps
28+
- name: Setup Bun
29+
uses: oven-sh/setup-bun@v2
4330
with:
44-
runPostinstallScripts: false
31+
bun-version: latest
32+
33+
- name: Install dependencies
34+
run: bun install --frozen-lockfile
4535

4636
- name: Run typecheck
47-
run: yarn typecheck
37+
run: bun run typecheck
4838

49-
prettier:
39+
build:
5040
runs-on: ubuntu-latest
51-
5241
steps:
5342
- name: Clone repository
5443
uses: actions/checkout@v5
5544

56-
- uses: ./.github/actions/setup-node-yarn-deps
45+
- name: Setup Bun
46+
uses: oven-sh/setup-bun@v2
5747
with:
58-
runPostinstallScripts: false
48+
bun-version: latest
5949

60-
- name: Run prettier
61-
run: yarn testPrettierAll
62-
63-
eslint:
64-
runs-on: ubuntu-latest
50+
- name: Install dependencies
51+
run: bun install --frozen-lockfile
6552

66-
steps:
67-
- name: Clone repository
68-
uses: actions/checkout@v5
53+
- name: Build Storybook
54+
run: bun run build
6955

70-
- uses: ./.github/actions/setup-node-yarn-deps
56+
- name: Upload Storybook artifact
57+
uses: actions/upload-artifact@v4
7158
with:
72-
runPostinstallScripts: false
73-
74-
- name: Run eslint
75-
# the --max-warnings makes eslint exit with non-zero exit code even for warnings
76-
run: yarn testLint --max-warnings=0
77-
78-
# Runs `bundlemon` on the code to see if our Vite build assets exceed a given file size.
79-
bundlemon:
80-
runs-on: ubuntu-latest
81-
82-
steps:
83-
- name: Clone repository
84-
uses: actions/checkout@v5
85-
86-
- uses: ./.github/actions/setup-node-yarn-deps
87-
88-
- name: Build
89-
run: yarn buildViteSite
90-
env:
91-
BUNDLEMON: true
92-
93-
- name: BundleMon
94-
uses: lironer/bundlemon-action@v1
59+
name: storybook-static
60+
path: storybook-static/
61+
retention-days: 7

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
language: ["javascript-typescript", "python"]
43+
language: ["javascript-typescript"]
4444
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
4545
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
4646
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both

0 commit comments

Comments
 (0)