Skip to content

Commit cc61109

Browse files
committed
ci: use bun for filesystem validation workflow
1 parent ea2aaba commit cc61109

2 files changed

Lines changed: 26 additions & 36 deletions

File tree

.doctrine/project.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,11 @@
109109
"recoveryClass": "forward-fix-only",
110110
"packageRelease": {
111111
"publishesPackages": true,
112-
"ecosystems": [
113-
"npm",
114-
"docker-hub",
115-
"github-release",
116-
"changesets"
117-
],
112+
"ecosystems": ["npm", "docker-hub", "github-release", "changesets"],
118113
"releaseIntent": "Changesets and version tags capture package/image release intent.",
119114
"versionPr": "Changesets version changes and release workflow evidence must precede publish.",
120115
"publisher": "GitHub Actions publish workflow with NPM_TOKEN and Docker Hub credentials.",
121-
"requiredContexts": [
122-
"Validate Code Quality"
123-
],
116+
"requiredContexts": ["Validate Code Quality"],
124117
"publishProof": "npm package readback, Docker Hub image tags, GitHub Release, and attached build artifact."
125118
}
126119
},

.github/workflows/publish.yml

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,30 @@ jobs:
3232
# Optional: config-file: './.github/codeql/codeql-config.yml'
3333
# Optional: queries: '+security-extended'
3434

35-
- name: Install pnpm
36-
uses: pnpm/action-setup@v4
35+
- name: Setup Bun
36+
uses: oven-sh/setup-bun@v2
3737
with:
38-
version: latest # Use the latest pnpm version
38+
bun-version: '1.3.1'
3939

4040
- name: Set up Node.js
4141
uses: actions/setup-node@v4.0.3
4242
with:
43-
node-version: 'lts/*' # Use latest LTS
44-
cache: 'pnpm' # Let pnpm handle caching via pnpm/action-setup
43+
node-version: '22.14'
4544

4645
- name: Install dependencies # Correct install step
47-
run: pnpm install --frozen-lockfile
46+
run: bun install --frozen-lockfile
4847

49-
- name: Check for vulnerabilities # Added pnpm audit
50-
run: pnpm audit --prod # Check only production dependencies
48+
- name: Check for vulnerabilities
49+
run: bun audit
5150

5251
- name: Check Formatting
53-
run: pnpm run check-format # Fails job if check fails
52+
run: bun run check-format # Fails job if check fails
5453

5554
- name: Lint Code
56-
run: pnpm run lint # Fails job if lint fails
55+
run: bun run lint # Fails job if lint fails
5756

5857
- name: Run Tests and Check Coverage
59-
run: pnpm run test:cov # Fails job if tests fail or coverage threshold not met
58+
run: bun run test:cov # Fails job if tests fail or coverage threshold not met
6059

6160
- name: Upload coverage to Codecov
6261
uses: codecov/codecov-action@v4.5.0 # Use Codecov action with fixed version
@@ -95,23 +94,22 @@ jobs:
9594
uses: actions/checkout@v5.0.0
9695
# Removed incorrect CodeQL init from here
9796

98-
- name: Install pnpm
99-
uses: pnpm/action-setup@v4
97+
- name: Setup Bun
98+
uses: oven-sh/setup-bun@v2
10099
with:
101-
version: latest
100+
bun-version: '1.3.1'
102101

103102
- name: Set up Node.js
104103
uses: actions/setup-node@v4.0.3
105104
with:
106-
node-version: 'lts/*' # Use latest LTS
107-
registry-url: 'https://registry.npmjs.org/' # For pnpm publish
108-
cache: 'pnpm' # Let pnpm handle caching
105+
node-version: '22.14'
106+
registry-url: 'https://registry.npmjs.org/' # For npm publish
109107

110108
- name: Install dependencies
111-
run: pnpm install --frozen-lockfile
109+
run: bun install --frozen-lockfile
112110

113111
- name: Build project
114-
run: pnpm run build
112+
run: bun run build
115113

116114
- name: Get package version from tag
117115
id: get_version
@@ -143,25 +141,24 @@ jobs:
143141
- name: Checkout repository
144142
uses: actions/checkout@v5.0.0
145143

146-
- name: Install pnpm
147-
uses: pnpm/action-setup@v4
144+
- name: Setup Bun
145+
uses: oven-sh/setup-bun@v2
148146
with:
149-
version: latest
147+
bun-version: '1.3.1'
150148

151149
- name: Set up Node.js for NPM
152150
uses: actions/setup-node@v4.0.3
153151
with:
154-
node-version: 'lts/*'
152+
node-version: '22.14'
155153
registry-url: 'https://registry.npmjs.org/'
156-
cache: 'pnpm'
157154

158155
# No need to install dependencies again if publish doesn't need them
159-
# If pnpm publish needs package.json, it's checked out
156+
# If package publish needs package.json, it's checked out
160157
- name: Install all dependencies for prepublishOnly script
161-
run: pnpm install --frozen-lockfile
158+
run: bun install --frozen-lockfile
162159

163160
- name: Publish to npm
164-
run: pnpm changeset publish
161+
run: bun run changeset:publish
165162
env:
166163
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
167164

0 commit comments

Comments
 (0)