diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 591bb3e2d..724a037ae 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -7,6 +7,12 @@ on: pull_request: workflow_dispatch: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: always. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} @@ -22,14 +28,28 @@ jobs: with: version: ${{ matrix.version }} - uses: julia-actions/cache@v2 + timeout-minutes: 5 - name: Develop subpackages run: | julia --project -e " using Pkg Pkg.develop([PackageSpec(; name=basename(path), path) for path in ARGS]) " lib/GPUArraysCore lib/JLArrays + - name: "Set test arguments" + shell: bash + run: | + # Run tests in verbose mode + TEST_ARGS=(--verbose) + if [[ ${{ runner.os }} == "macOS" ]]; then + # Encourage ParallelTestRunner to use two jobs on macOS, rather + # than the single one it'd use by default. + TEST_ARGS+=(--jobs=2) + fi + echo "runtest_test_args=${TEST_ARGS[@]}" >> "${GITHUB_ENV}" - uses: julia-actions/julia-runtest@v1 continue-on-error: ${{ matrix.version == 'nightly' }} + with: + test_args: ${{ env.runtest_test_args }} - uses: julia-actions/julia-processcoverage@v1 with: directories: src,lib