feat: update to 6.2 swift (#3) #26
This file contains hidden or 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
| # This workflow will build a Swift project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | |
| name: Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ========================= | |
| # macOS | |
| # ========================= | |
| macos: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Cache SwiftPM | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .build | |
| ~/Library/Developer/Xcode/DerivedData | |
| key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Build | |
| run: swift build -v | |
| - name: Run tests | |
| run: swift test -v --enable-code-coverage | |
| - name: Fetch Coverage | |
| id: coverage-files | |
| uses: sersoft-gmbh/swift-coverage-action@v4 | |
| - name: Publish Coverage to Codecov | |
| uses: codecov/codecov-action@v4.0.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ${{ steps.coverage-files.outputs.files }} | |
| # ========================= | |
| # Linux | |
| # ========================= | |
| linux: | |
| runs-on: ubuntu-latest | |
| container: swift:6.2-jammy | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache SwiftPM | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: linux-spm-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| linux-spm- | |
| - name: Build | |
| run: swift build -v | |
| - name: Run tests | |
| run: swift test |