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 9282290
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: build

on:
push:

permissions:
contents: read

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

- name: setup swift
uses: swift-actions/setup-swift@v1
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
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 Reports (${{ matrix.swift }})"
echo ""
echo "Unit Tests: <${{ steps.results-unit-tests.outputs.url_html }}>"
} >> $GITHUB_STEP_SUMMARY

0 comments on commit 9282290

Please sign in to comment.