Skip to content

Commit

Permalink
Add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jozefizso committed Feb 7, 2024
1 parent a18eda9 commit 84fd31e
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
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

0 comments on commit 84fd31e

Please sign in to comment.