diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 104f2a0..c8e5576 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,23 +1,43 @@ -name: test +name: Test + on: pull_request: push: { branches: [ main ] } +env: + PACKAGE_PATH: ${{ inputs.package_path != '' && format('--package-path={0}', inputs.package_path) || '' }} + jobs: - macos-test: + macos: + name: Test on macOS runs-on: macos-latest steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest - - uses: actions/checkout@v4 - - name: Darwin build & test - run: swift test --enable-all-traits --skip IntegrationTests - linux-test: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + - uses: actions/checkout@v4 + - name: Build and test + run: | + swift test \ + --parallel \ + --enable-all-traits \ + --skip IntegrationTests + + linux: + name: Test on Linux - ${{ matrix.swift-image }} + strategy: + matrix: + swift-image: + - "swift:6.1-jammy" + - "swift:6.1-noble" runs-on: ubuntu-latest - container: - image: swift:latest + container: ${{ matrix.swift-image }} steps: - - uses: actions/checkout@v4 - - name: Linux build & test - run: swift test --traits ClientNIO,ServerVapor --skip IntegrationTests + - name: Checkout + uses: actions/checkout@v4 + - name: Test + run: | + swift test \ + --parallel \ + --traits ClientNIO,ServerVapor \ + --skip IntegrationTests