Skip to content

Add build workflow

Add build workflow #1

Workflow file for this run

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