-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (69 loc) · 2.24 KB
/
build.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: build
on:
push:
branches: [ "main", "dev/*", "test/*" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
checks: write
jobs:
build:
strategy:
matrix:
swift: ['swift6.0', 'swift5.10', 'swift5.9']
include:
- swift: 'swift6.0'
xcode-path: '/Applications/Xcode_16.1.0.app'
macos: 'macos-15'
- swift: 'swift5.10'
xcode-path: '/Applications/Xcode_15.4.0.app'
macos: 'macos-14'
- swift: 'swift5.9'
xcode-path: '/Applications/Xcode_15.2.0.app'
macos: 'macos-14'
env:
DEVELOPER_DIR: ${{ matrix.xcode-path }}
runs-on: ${{ matrix.macos }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: swift version
run: swift --version
- name: build
run: swift build -v
- name: reports directory
run: mkdir reports
- name: run unit tests
continue-on-error: true
run: swift test --filter='AppcastTests' --parallel --xunit-output reports/AppcastTests.xml
- name: report unit test results
uses: dorny/test-reporter@afe6793191b75b608954023a46831a3fe10048d4
if: always()
id: results-unit-tests
with:
name: 'results-unit-tests-${{ matrix.swift }}'
path: reports/AppcastTests.xml
reporter: java-junit
fail-on-error: true
- name: run integration tests
continue-on-error: true
run: swift test --filter='IntegrationTests' --parallel --xunit-output reports/IntegrationTests.xml || true
- name: report integration test results
uses: dorny/test-reporter@afe6793191b75b608954023a46831a3fe10048d4
if: always()
id: results-integration-tests
with:
name: 'results-integration-tests-${{ matrix.swift }}'
path: reports/IntegrationTests.xml
reporter: java-junit
fail-on-error: false
- name: summary
if: always()
run: |
{
echo "# Test Reports (${{ matrix.swift }})"
echo ""
echo "Unit Tests: <${{ steps.results-unit-tests.outputs.url_html }}>"
echo "Integration Tests: <${{ steps.results-integration-tests.outputs.url_html }}>"
} >> $GITHUB_STEP_SUMMARY