Skip to content

Commit c4a32f1

Browse files
authored
Reorganize tests and update CI (#162)
1 parent 5bdd823 commit c4a32f1

File tree

10 files changed

+79
-16
lines changed

10 files changed

+79
-16
lines changed

.github/workflows/ci.yml renamed to .github/workflows/CI.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: CI
2+
23
on:
34
push:
45
branches:
56
- master
67
pull_request:
8+
79
jobs:
810
test:
911
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -22,6 +24,11 @@ jobs:
2224
- windows-latest
2325
arch:
2426
- x64
27+
include:
28+
- version: 1
29+
os: ubuntu-latest
30+
arch: x64
31+
coverage: true
2532
steps:
2633
- uses: actions/checkout@v2
2734
- uses: julia-actions/setup-julia@v1
@@ -40,12 +47,14 @@ jobs:
4047
${{ runner.os }}-
4148
- uses: julia-actions/julia-buildpkg@v1
4249
- uses: julia-actions/julia-runtest@v1
50+
with:
51+
coverage: ${{ matrix.coverage || false }}
4352
env:
44-
# run compat tests with Turing and Soss only with stable Julia version
45-
GROUP: ${{ (matrix.version == '1' && 'All') || 'AbstractGPs' }}
53+
GROUP: AbstractGPs
4654
- uses: julia-actions/julia-processcoverage@v1
55+
if: matrix.coverage
4756
- name: Send coverage
48-
if: matrix.version == '1' && matrix.os == 'ubuntu-latest'
57+
if: matrix.coverage
4958
uses: codecov/codecov-action@v1
5059
with:
5160
file: lcov.info

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
name: CompatHelper
2+
23
on:
34
schedule:
4-
- cron: '00 00 * * *'
5+
- cron: 0 0 * * *
56
workflow_dispatch:
7+
68
jobs:
79
CompatHelper:
810
runs-on: ubuntu-latest
911
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
12+
- name: "Install CompatHelper"
13+
run: |
14+
import Pkg
15+
name = "CompatHelper"
16+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
17+
version = "2"
18+
Pkg.add(; name, uuid, version)
19+
shell: julia --color=yes {0}
20+
- name: "Run CompatHelper"
21+
run: |
22+
import CompatHelper
23+
CompatHelper.main(; subdirs=["", "test", "test/ppl", "docs"])
24+
shell: julia --color=yes {0}
1325
env:
1426
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1527
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "test", "test/compat", "docs"])'

.github/workflows/PPL.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: PPL
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
ppl:
11+
name: PPL tests (Turing and Soss)
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
version:
17+
- '1'
18+
os:
19+
- ubuntu-latest
20+
arch:
21+
- x64
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: julia-actions/setup-julia@v1
25+
with:
26+
version: ${{ matrix.version }}
27+
arch: ${{ matrix.arch }}
28+
- uses: actions/cache@v1
29+
env:
30+
cache-name: cache-artifacts
31+
with:
32+
path: ~/.julia/artifacts
33+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
34+
restore-keys: |
35+
${{ runner.os }}-test-${{ env.cache-name }}-
36+
${{ runner.os }}-test-
37+
${{ runner.os }}-
38+
- uses: julia-actions/julia-buildpkg@v1
39+
- uses: julia-actions/julia-runtest@v1
40+
with:
41+
coverage: false
42+
env:
43+
GROUP: PPL

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*.ipynb
55
.DS_Store
66
/test/Manifest.toml
7-
/test/compat/Manifest.toml
7+
/test/ppl/Manifest.toml
88
/Manifest.toml
99
/dev/
1010
/docs/build/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# AbstractGPs
22

33
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaGaussianProcesses.github.io/AbstractGPs.jl/dev)
4-
![CI](https://github.com/JuliaGaussianProcesses/AbstractGPs.jl/workflows/CI/badge.svg?branch=master)
4+
[![CI](https://github.com/JuliaGaussianProcesses/AbstractGPs.jl/workflows/CI/badge.svg?branch=master)](https://github.com/JuliaGaussianProcesses/AbstractGPs.jl/actions/workflows/CI.yml?query=branch%3Amaster)
55
[![Codecov](https://codecov.io/gh/JuliaGaussianProcesses/AbstractGPs.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaGaussianProcesses/AbstractGPs.jl)
66
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
77
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
File renamed without changes.

test/compat/runtests.jl renamed to test/ppl/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using Soss: Soss, For
66
using Test
77
using Turing: Turing
88

9-
@testset "compat" begin
9+
@testset "PPLs" begin
1010
include("turing.jl")
1111
println(" ")
1212
@info "Ran Turing tests"

test/compat/soss.jl renamed to test/ppl/soss.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@testset "soss compat" begin
1+
@testset "Soss" begin
22
@testset "GP regression" begin
33
k = SqExponentialKernel()
44
y = randn(3)

test/compat/turing.jl renamed to test/ppl/turing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@testset "turing compat" begin
1+
@testset "Turing" begin
22
@testset "GP regression" begin
33
k = SqExponentialKernel()
44
y = randn(3)

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ include("test_util.jl")
9090
end
9191
end
9292

93-
if GROUP == "All" && VERSION >= v"1.5"
94-
Pkg.activate("compat")
93+
if (GROUP == "All" || GROUP == "PPL") && VERSION >= v"1.5"
94+
Pkg.activate("ppl")
9595
Pkg.develop(PackageSpec(; path=PKGDIR))
9696
Pkg.instantiate()
97-
include(joinpath("compat", "runtests.jl"))
97+
include(joinpath("ppl", "runtests.jl"))
9898
end
9999
end

0 commit comments

Comments
 (0)