-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (36 loc) · 1.06 KB
/
linux.yml
File metadata and controls
48 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Linux
on:
push:
branches: [main]
pull_request:
jobs:
build-and-test:
name: Swift ${{ matrix.swift }} on Linux
runs-on: ubuntu-latest
strategy:
matrix:
swift: ["6.2"]
container: swift:${{ matrix.swift }}
steps:
- uses: actions/checkout@v4
- name: Build DHModels
run: swift build --target DHModels
- name: Build DHKit
run: swift build --target DHKit
- name: Build validate-dhpack
run: swift build --target validate-dhpack
- name: Test DHModels
run: swift test --filter DHModelsTests
- name: Test DHKit
run: swift test --filter DHKitTests
swift-format:
name: swift-format lint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
container: swift:6.2
steps:
- uses: actions/checkout@v4
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Lint
run: git ls-files -z '*.swift' | xargs -0 swift-format lint --strict --parallel