Skip to content

Commit 942c660

Browse files
committed
update test workflow
1 parent 56be3ce commit 942c660

1 file changed

Lines changed: 10 additions & 68 deletions

File tree

.github/workflows/Tests.yml

Lines changed: 10 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Tests
2+
23
on:
34
push:
45
branches:
5-
- 'master'
66
- 'main'
7-
- 'release-'
87
tags: '*'
98
paths-ignore:
109
- 'docs/**'
@@ -14,71 +13,14 @@ on:
1413

1514
concurrency:
1615
group: ${{ github.workflow }}-${{ github.ref }}
17-
# Cancel intermediate builds: only if it is a pull request build.
1816
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
19-
jobs:
20-
setup-matrix:
21-
runs-on: ubuntu-latest
22-
outputs:
23-
groups: ${{ steps.mk.outputs.groups }}
24-
version: ${{ steps.mk.outputs.version }}
25-
os: ${{ steps.mk.outputs.os }}
26-
steps:
27-
- uses: actions/checkout@v6
28-
- id: mk
29-
shell: bash
30-
run: |
31-
# Auto-discover test groups from all subdirectory names.
32-
groups=$(find test -mindepth 1 -maxdepth 1 -type d \
33-
| xargs -I{} basename {} | sort \
34-
| jq -R -s -c '[split("\n")[] | select(length > 0) | select(.!= "testsuite")]')
35-
36-
echo "groups=${groups}" >> "$GITHUB_OUTPUT"
3717

38-
# Draft PR: only run ubuntu-latest + version=1
39-
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.draft }}" == "true" ]]; then
40-
echo 'version=["1"]' >> "$GITHUB_OUTPUT"
41-
echo 'os=["ubuntu-latest"]' >> "$GITHUB_OUTPUT"
42-
else
43-
echo 'version=["min","1"]' >> "$GITHUB_OUTPUT"
44-
echo 'os=["ubuntu-latest","macOS-latest","windows-latest"]' >> "$GITHUB_OUTPUT"
45-
fi
46-
47-
test:
48-
name: "Tests (${{ matrix.group }}, ${{ matrix.os }}, Julia ${{ matrix.version }})"
49-
needs: setup-matrix
50-
strategy:
51-
fail-fast: false
52-
matrix:
53-
version: ${{ fromJSON(needs.setup-matrix.outputs.version) }}
54-
os: ${{ fromJSON(needs.setup-matrix.outputs.os) }}
55-
group: ${{ fromJSON(needs.setup-matrix.outputs.groups) }}
56-
exclude:
57-
- os: macos-latest
58-
version: 1
59-
group: enzyme
60-
- os: macos-latest
61-
version: "min"
62-
group: enzyme
63-
runs-on: ${{ matrix.os }}
64-
timeout-minutes: 120
65-
steps:
66-
- uses: actions/checkout@v6
67-
- uses: julia-actions/setup-julia@v3
68-
with:
69-
version: ${{ matrix.version }}
70-
- uses: julia-actions/cache@v3
71-
- uses: julia-actions/julia-buildpkg@v1
72-
- uses: julia-actions/julia-runtest@v1
73-
with:
74-
test_args: '${{ matrix.group }}${{ github.event.pull_request.draft == true && '' --fast'' || '''' }}'
75-
env:
76-
JULIA_NUM_THREADS: "4"
77-
- uses: julia-actions/julia-processcoverage@v1
78-
with:
79-
directories: 'src,ext'
80-
- uses: codecov/codecov-action@v6
81-
with:
82-
files: lcov.info
83-
token: ${{ secrets.CODECOV_TOKEN }}
84-
fail_ci_if_error: false
18+
jobs:
19+
tests:
20+
uses: "QuantumKitHub/QuantumKitHubActions/.github/workflows/TestGroups.yml@main"
21+
with:
22+
fast: ${{ github.event.pull_request.draft == true }}
23+
exclude:
24+
- testsuite
25+
secrets:
26+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)