forked from p2/OAuth2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
|
||
permissions: | ||
contents: read | ||
checks: write | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
swift: ['5.2', '5.9'] | ||
|
||
env: | ||
DEVELOPER_DIR: '/Applications/Xcode_15.2.app' | ||
|
||
runs-on: macos-14 | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: setup swift | ||
uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4 # v1.26.0 | ||
with: | ||
swift-version: ${{ matrix.swift}} | ||
|
||
- name: build | ||
run: swift build -v | ||
|
||
- name: reports directory | ||
run: mkdir reports | ||
|
||
- name: run unit tests | ||
continue-on-error: true | ||
run: swift test --parallel --xunit-output reports/test_results.xml | ||
|
||
- name: report unit test results | ||
uses: dorny/test-reporter@eaa763f6ffc21c7a37837f56cd5f9737f27fc6c8 # v1.8.0 | ||
if: always() | ||
id: results-unit-tests | ||
with: | ||
name: 'results-unit-tests (swift-${{ matrix.swift }})' | ||
path: reports/test_results.xml | ||
reporter: swift-xunit | ||
fail-on-error: true | ||
|
||
- name: summary | ||
if: always() | ||
run: | | ||
{ | ||
echo "# Test Report (Swift ${{ matrix.swift }})" | ||
echo "" | ||
echo "Unit Tests: <${{ steps.results-unit-tests.outputs.url_html }}>" | ||
} >> $GITHUB_STEP_SUMMARY |