Skip to content

Commit fc82e32

Browse files
committed
setup groups in test matrix, Safetestsets
1 parent fc4fe0b commit fc82e32

File tree

5 files changed

+35
-11
lines changed

5 files changed

+35
-11
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1414
jobs:
1515
test:
16-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
16+
name: Julia ${{ matrix.group }} - ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1717
runs-on: ${{ matrix.os }}
1818
timeout-minutes: 60
1919
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
@@ -22,9 +22,13 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25+
# https://youtu.be/fQJrEQIRPZU?list=PLP8iPy9hna6Tze1CReUAQweWHyNdXaPNb&t=967
26+
group:
27+
- Basic
28+
- Aqua
2529
version:
30+
- '1'
2631
- '1.10'
27-
- '1.6'
2832
os:
2933
- ubuntu-latest
3034
arch:
@@ -38,6 +42,8 @@ jobs:
3842
- uses: julia-actions/cache@v2
3943
- uses: julia-actions/julia-buildpkg@v1
4044
- uses: julia-actions/julia-runtest@v1
45+
env:
46+
GROUP: ${{ matrix.group }}
4147
- uses: julia-actions/julia-processcoverage@v1
4248
- uses: codecov/codecov-action@v4
4349
with:

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.jl.*.cov
22
*.jl.cov
33
*.jl.mem
4-
/Manifest.toml
5-
/docs/Manifest.toml
4+
/Manifest*.toml
5+
/docs/Manifest*.toml
66
/docs/build/
7+
test/Manifest*.toml

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[deps]
22
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
34
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

test/runtests.jl

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
using HybridVariationalInference
2-
using Test
3-
using Aqua
1+
using Test, SafeTestsets
2+
const GROUP = get(ENV, "GROUP", "All") # defined in in CI.yml
43

5-
@testset "HybridVariationalInference.jl" begin
6-
@testset "Code quality (Aqua.jl)" begin
7-
Aqua.test_all(HybridVariationalInference)
4+
@time begin
5+
if GROUP == "All" || GROUP == "Basic"
86
end
9-
# Write your tests here.
107
end
8+
9+
@time begin
10+
if GROUP == "All" || GROUP == "Aqua"
11+
#@safetestset "test_aqua" include("test/test_aqua.jl")
12+
@time @safetestset "test_aqua" include("test_aqua.jl")
13+
end
14+
end
15+
16+

test/test_aqua.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using HybridVariationalInference
2+
using Test
3+
using Aqua
4+
5+
@testset "HybridVariationalInference.jl" begin
6+
@testset "Code quality (Aqua.jl)" begin
7+
Aqua.test_all(HybridVariationalInference)
8+
end
9+
# Write your tests here.
10+
end

0 commit comments

Comments
 (0)