-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (55 loc) · 1.86 KB
/
swift-test.yml
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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
variables:
outputs:
max-supported-swift-version: '5.9'
xcode-scheme: simple-formatting
xcode-platform-version: latest
fail-if-codecov-fails: true
runs-on: ubuntu-latest
steps:
- run: exit 0
test-spm:
needs: variables
strategy:
matrix:
os: [ macOS, ubuntu ]
swift-version-offset: [ 0 ]
uses: sersoft-gmbh/oss-common-actions/.github/workflows/swift-test-spm.yml@main
with:
os: ${{ matrix.os }}
max-swift-version: ${{ needs.variables.outputs.max-supported-swift-version }}
swift-version-offset: ${{ matrix.swift-version-offset }}
# This is a workaround since Swift ships ICU headers that aren't aligned with the installed ICU package.
container-before-run: apt-get update -qq && apt-get -q install -y --reinstall libicu-dev
fail-if-codecov-fails: ${{ fromJson(needs.variables.outputs.fail-if-codecov-fails) }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-xcode:
needs: variables
strategy:
matrix:
platform:
- macOS
- iOS
- iPadOS
- tvOS
- watchOS
swift-version-offset: [ 0 ]
uses: sersoft-gmbh/oss-common-actions/.github/workflows/swift-test-xcode.yml@main
with:
xcode-scheme: ${{ needs.variables.outputs.xcode-scheme }}
max-swift-version: ${{ needs.variables.outputs.max-supported-swift-version }}
swift-version-offset: ${{ matrix.swift-version-offset }}
platform: ${{ matrix.platform }}
platform-version: ${{ needs.variables.outputs.xcode-platform-version }}
fail-if-codecov-fails: ${{ fromJson(needs.variables.outputs.fail-if-codecov-fails) }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}