Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit b826987

Browse files
committed
CI/CD: Move lint into seperate workflow
1 parent 4b52cb2 commit b826987

File tree

3 files changed

+59
-213
lines changed

3 files changed

+59
-213
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
branches: ["**"]
88

99
jobs:
10-
lint-test:
11-
name: Lint and Test
10+
unit-test:
11+
name: Test
1212
runs-on: ubuntu-latest
1313
permissions:
1414
contents: write
@@ -27,25 +27,6 @@ jobs:
2727
- name: Install dependencies
2828
run: bun install
2929

30-
- name: Knip check
31-
if: ${{ github.event_name == 'pull_request' }}
32-
uses: codex-/knip-reporter@v2
33-
34-
- name: Run linter
35-
run: |
36-
bun biome format --fix
37-
bun biome lint --fix
38-
bun biome check --fix
39-
bun biome ci
40-
41-
- name: Add linted files
42-
run: git add src/
43-
44-
- name: Check for changes
45-
id: check-changes
46-
run: |
47-
git diff --cached --quiet || echo "changes_detected=true" >> $GITHUB_OUTPUT
48-
4930
- name: Run unit tests
5031
run: |
5132
export PAD_NEW_LINES=false
@@ -59,16 +40,6 @@ jobs:
5940
with:
6041
report_paths: "reports/junit/*.xml"
6142

62-
- name: Commit and push lint changes
63-
if: |
64-
steps.check-changes.outputs.changes_detected == 'true' &&
65-
github.event_name == 'push'
66-
run: |
67-
git config --global user.name "GitHub Actions"
68-
git config --global user.email "actions@github.com"
69-
git commit -m "CQL: Apply lint fixes [skip ci]"
70-
git push
71-
7243
build-scan:
7344
name: Build and Security Scan
7445
runs-on: ubuntu-latest

.github/workflows/lint.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
lint-test:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
checks: write
16+
security-events: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Bun
23+
uses: oven-sh/setup-bun@v2
24+
with:
25+
bun-version: latest
26+
27+
- name: Install dependencies
28+
run: bun install
29+
30+
- name: Knip check
31+
if: ${{ github.event_name == 'pull_request' }}
32+
uses: codex-/knip-reporter@v2
33+
34+
- name: Run linter
35+
run: |
36+
bun biome format --fix
37+
bun biome lint --fix
38+
bun biome check --fix
39+
bun biome ci
40+
41+
- name: Add linted files
42+
run: git add src/
43+
44+
- name: Check for changes
45+
id: check-changes
46+
run: |
47+
git diff --cached --quiet || echo "changes_detected=true" >> $GITHUB_OUTPUT
48+
49+
- name: Commit and push lint changes
50+
if: |
51+
steps.check-changes.outputs.changes_detected == 'true' &&
52+
github.event_name == 'push'
53+
run: |
54+
git config --global user.name "GitHub Actions"
55+
git config --global user.email "actions@github.com"
56+
git commit -m "CQL: Apply lint fixes [skip ci]"
57+
git push

0 commit comments

Comments
 (0)