Skip to content

Commit 38be1b6

Browse files
committed
✨ :: Add GitHub action to run formatting, linting and tests
1 parent e6b7b59 commit 38be1b6

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#
2+
# continuous-integration.yml
3+
# Created by Felix Mau (https://felix.hamburg)
4+
#
5+
6+
name: Continuous Integration
7+
on:
8+
pull_request:
9+
push:
10+
branches:
11+
- main
12+
workflow_dispatch:
13+
jobs:
14+
lint-and-format:
15+
runs-on: macos-26
16+
steps:
17+
- name: Check out repository code
18+
uses: actions/checkout@v6
19+
20+
- name: Install SwiftFormat via Homebrew
21+
run: brew install swiftformat
22+
23+
- name: Install SwiftLint via Homebrew
24+
run: brew install swiftlint
25+
26+
- name: SwiftFormat
27+
run: make format-check
28+
29+
- name: SwiftLint
30+
run: make lint
31+
32+
tests:
33+
runs-on: macos-26
34+
needs: lint-and-format
35+
steps:
36+
- name: Check out repository code
37+
uses: actions/checkout@v6
38+
39+
- name: Execute tests
40+
run: make test
41+
42+
- name: Upload coverage to Codecov
43+
uses: codecov/codecov-action@v4
44+
with:
45+
fail_ci_if_error: true
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
xcode: true

0 commit comments

Comments
 (0)