Skip to content

Commit 7ce9d76

Browse files
committed
ci: automate code formatting and linting with github actions
1 parent 86e27bd commit 7ce9d76

2 files changed

Lines changed: 51 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- dev
87
pull_request:
98
paths:
109
- '.swiftlint.yml'
@@ -108,24 +107,4 @@ jobs:
108107
with:
109108
name: MergedTestResults
110109
path: test_output/final
111-
retention-days: 30
112-
113-
discover-typos:
114-
name: Discover Typos
115-
runs-on: macos-15
116-
env:
117-
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
118-
steps:
119-
- uses: actions/checkout@v6
120-
121-
- name: Set up Python environment
122-
run: |
123-
python3 -m venv .venv
124-
source .venv/bin/activate
125-
pip install --upgrade pip
126-
pip install codespell
127-
128-
- name: Discover typos
129-
run: |
130-
source .venv/bin/activate
131-
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
110+
retention-days: 30

.github/workflows/lint.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
paths:
9+
- "Sources/**"
10+
- ".github/workflows/ci.yml"
11+
- "Tests/**"
12+
13+
concurrency:
14+
group: lint-${{ github.head_ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
lint:
22+
name: lint
23+
runs-on: macos-15
24+
steps:
25+
- uses: actions/checkout@v6
26+
with:
27+
fetch-depth: 0
28+
- uses: jdx/mise-action@v3
29+
- name: Run
30+
run: mise run lint
31+
32+
discover-typos:
33+
name: discover-typos
34+
runs-on: macos-15
35+
env:
36+
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
37+
steps:
38+
- uses: actions/checkout@v6
39+
40+
- name: Set up Python environment
41+
run: |
42+
python3 -m venv .venv
43+
source .venv/bin/activate
44+
pip install --upgrade pip
45+
pip install codespell
46+
47+
- name: Discover typos
48+
run: |
49+
source .venv/bin/activate
50+
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"

0 commit comments

Comments
 (0)