Skip to content

Commit b29b5af

Browse files
authored
Implement concurrency for Test.yml workflow (#651)
* Implement concurrency for Test.yml workflow Add concurrency settings to the CI workflow * Update Test.yml to add timeout and test arguments
1 parent 8c02b43 commit b29b5af

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/Test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
concurrency:
11+
# Skip intermediate builds: always.
12+
# Cancel intermediate builds: always.
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1016
jobs:
1117
test:
1218
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
@@ -22,14 +28,28 @@ jobs:
2228
with:
2329
version: ${{ matrix.version }}
2430
- uses: julia-actions/cache@v2
31+
timeout-minutes: 5
2532
- name: Develop subpackages
2633
run: |
2734
julia --project -e "
2835
using Pkg
2936
Pkg.develop([PackageSpec(; name=basename(path), path) for path in ARGS])
3037
" lib/GPUArraysCore lib/JLArrays
38+
- name: "Set test arguments"
39+
shell: bash
40+
run: |
41+
# Run tests in verbose mode
42+
TEST_ARGS=(--verbose)
43+
if [[ ${{ runner.os }} == "macOS" ]]; then
44+
# Encourage ParallelTestRunner to use two jobs on macOS, rather
45+
# than the single one it'd use by default.
46+
TEST_ARGS+=(--jobs=2)
47+
fi
48+
echo "runtest_test_args=${TEST_ARGS[@]}" >> "${GITHUB_ENV}"
3149
- uses: julia-actions/julia-runtest@v1
3250
continue-on-error: ${{ matrix.version == 'nightly' }}
51+
with:
52+
test_args: ${{ env.runtest_test_args }}
3353
- uses: julia-actions/julia-processcoverage@v1
3454
with:
3555
directories: src,lib

0 commit comments

Comments
 (0)