-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (79 loc) · 2.46 KB
/
test.yaml
File metadata and controls
93 lines (79 loc) · 2.46 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Test
permissions:
contents: read
on:
pull_request:
branches:
- main
merge_group:
types:
- checks_requested
branches:
- main
push:
branches:
- main
jobs:
load-env:
uses: ./.github/workflows/load-env.yaml
test:
needs:
- load-env
env:
package_name: ${{ needs.load-env.outputs.package-name }}
strategy:
matrix:
include:
- os: ${{ needs.load-env.outputs.macOS-runner-os }}
build-system: swift
swift-version: ${{ needs.load-env.outputs.swift-version }}
xcode-version: ${{ needs.load-env.outputs.xcode-version }}
- os: ubuntu-latest
build-system: swift
swift-version: ${{ needs.load-env.outputs.swift-version }}
container: swift:${{ needs.load-env.outputs.swift-version }}
- os: ${{ needs.load-env.outputs.macOS-runner-os }}
build-system: xcodebuild
xcode-version: ${{ needs.load-env.outputs.xcode-version }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Prepare Swift
uses: ./.github/workflows/templates/prepare-swift/
with:
xcode-version: ${{ matrix.xcode-version }}
swift-version: ${{ matrix.swift-version }}
build-system: ${{ matrix.build-system }}
configuration: debug
- name: Build with ${{ matrix.build-system }}
run: mise tasks run build:${BUILD_SYSTEM} --configuration=debug
env:
BUILD_SYSTEM: ${{ matrix.build-system }}
- name: Test with ${{ matrix.build-system }}
run: mise tasks run test:${BUILD_SYSTEM} --configuration=debug
env:
BUILD_SYSTEM: ${{ matrix.build-system }}
lint:
needs:
- load-env
runs-on: ubuntu-latest
container: swift:${{ needs.load-env.outputs.swift-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Prepare Swift
uses: ./.github/workflows/templates/prepare-swift/
with:
xcode-version: ${{ needs.load-env.outputs.xcode-version }}
swift-version: ${{ needs.load-env.outputs.swift-version }}
build-system: swift
configuration: debug
use-build-cache: false
- name: Lint
run: mise tasks run lint