diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28a7c044..3a6edb22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,22 +1,12 @@ name: test on: { pull_request: {} } -jobs: - getcidata: - runs-on: ubuntu-latest - outputs: - environments: ${{ steps.output.outputs.environments }} - steps: - - id: output - run: | - envblob="$(curl -fsSL https://raw.githubusercontent.com/vapor/ci/main/pr-environments.json | jq -cMj '.')" - echo "::set-output name=environments::${envblob}" - + +jobs: test-new: - needs: getcidata + # Run the workflow on multiple machines strategy: fail-fast: false - # TODO: This produces 40 checks, that's too many matrix: fluentflags: - --no-fluent @@ -27,17 +17,13 @@ jobs: leafflags: - --leaf - --no-leaf - env: ${{ fromJSON(needs.getcidata.outputs.environments) }} - runs-on: ${{ matrix.env.os }} - container: ${{ matrix.env.image }} + os: [ubuntu-latest] + image: ["swift:5.5-focal"] + runs-on: ${{ matrix.os }} + container: ${{ matrix.image }} steps: - - name: Select toolchain - uses: maxim-lobanov/setup-xcode@v1.2.1 - with: - xcode-version: ${{ matrix.env.toolchain }} - if: ${{ matrix.env.toolchain != '' }} - name: Install SQLite if needed - if: ${{ contains(matrix.fluentflags, 'sqlite') && matrix.env.image != '' }} + if: ${{ contains(matrix.fluentflags, 'sqlite') }} run: apt-get -q update && apt-get -q install -y libsqlite3-dev - name: Check out toolbox uses: actions/checkout@v2 @@ -52,12 +38,20 @@ jobs: - name: Test new project run: swift test --package-path /tmp/toolbox-test --enable-test-discovery + createJSON: + runs-on: ubuntu-latest + outputs: + environments: ${{ steps.output.outputs.environments }} + steps: + - id: output + run: echo "::set-output name=environments::[{\"os\":\"ubuntu-latest\", \"image\":\"swift:5.2-focal\", \"toolchain\":null},{\"os\":\"ubuntu-latest\", \"image\":\"swift:5.5-focal\", \"toolchain\":null},{\"os\":\"macos-11\", \"image\":null, \"toolchain\":\"latest\"}]" + test-toolbox: - needs: getcidata + needs: createJSON strategy: fail-fast: false matrix: - env: ${{ fromJSON(needs.getcidata.outputs.environments) }} + env: ${{ fromJSON(needs.createJSON.outputs.environments) }} runs-on: ${{ matrix.env.os }} container: ${{ matrix.env.image }} steps: