diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml deleted file mode 100644 index 0026107..0000000 --- a/.github/workflows/swift.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Swift CI - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - test: - name: Run Unit Tests on macOS and Linux - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, ubuntu-latest] - swift: ["5.9", "5.10", "6.0"] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Swift ${{ matrix.swift }} - uses: NeedleInAJayStack/setup-swift@feat/swift-6 - with: - swift-version: ${{ matrix.swift }} - - - name: Build and Run Tests - run: | - swift build --enable-test-discovery - swift test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4fc1461 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,52 @@ +name: test +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test-linux: + name: Tests Linux + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ toJSON(matrix) }} + cancel-in-progress: true + strategy: + fail-fast: false + matrix: + swift: ["5.9", "5.10", "6.0"] + + runs-on: ubuntu-latest + container: swift:${{ matrix.swift }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build + run: swift build + + - name: Run tests + run: swift test + + test-macos: + name: Tests MacOS + runs-on: macos-14 + + steps: + - name: Select toolchain + uses: maxim-lobanov/setup-xcode@v1 + with: { xcode-version: latest-stable } + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build + run: swift build + + - name: Run tests + run: swift test