Skip to content

Update build workflow for Swift 6.0, 5.10 and 5.9 #41

Update build workflow for Swift 6.0, 5.10 and 5.9

Update build workflow for Swift 6.0, 5.10 and 5.9 #41

Workflow file for this run

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