Skip to content

Commit 453a2e3

Browse files
committed
ci: add GitHub Actions macOS workflow to build & run tests
1 parent f03cafc commit 453a2e3

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
name: Build & Test (macOS)
12+
runs-on: macos-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Swift version
18+
run: swift --version
19+
20+
- name: Cache SwiftPM
21+
uses: actions/cache@v4
22+
with:
23+
path: |
24+
.build
25+
.swiftpm
26+
key: ${{ runner.os }}-swift-${{ hashFiles('Package.resolved') }}
27+
restore-keys: |
28+
${{ runner.os }}-swift-
29+
30+
- name: Resolve packages
31+
run: swift package resolve
32+
33+
- name: Build (debug)
34+
run: swift build
35+
36+
- name: Run tests (verbose)
37+
run: swift test --parallel
38+
39+
- name: List package structure
40+
if: failure()
41+
run: |
42+
echo "-- ls -la --"
43+
ls -la
44+
echo "-- swift package show-dependencies --"
45+
swift package show-dependencies --format json || true

0 commit comments

Comments
 (0)