Skip to content

Commit

Permalink
Merge pull request #311 from MilesCranmer/split-up-test
Browse files Browse the repository at this point in the history
ci: split up test suite into multiple runners
  • Loading branch information
MilesCranmer committed Apr 28, 2024
2 parents 2287c83 + c6f325c commit 7a2998d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/CI.yml
Expand Up @@ -25,12 +25,15 @@ concurrency:

jobs:
test:
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ github.event_name }}
name: Julia ${{ matrix.julia-version }}-${{ matrix.os }}-${{ matrix.test }}-${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
test:
- "unit"
- "integration"
julia-version:
- "1.6"
- "1.8"
Expand All @@ -40,10 +43,22 @@ jobs:
include:
- os: windows-latest
julia-version: "1"
test: "unit"
- os: windows-latest
julia-version: "1"
test: "integration"
- os: macOS-latest
julia-version: "1"
test: "unit"
- os: macOS-latest
julia-version: "1"
test: "integration"
- os: ubuntu-latest
julia-version: "~1.11.0-0"
test: "unit"
- os: ubuntu-latest
julia-version: "~1.11.0-0"
test: "integration"

steps:
- uses: actions/checkout@v4
Expand All @@ -56,6 +71,8 @@ jobs:
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1
- name: "Run tests"
env:
SYMBOLIC_REGRESSION_TEST_SUITE: ${{ matrix.test }}
run: |
julia --color=yes -e 'import Pkg; Pkg.add("Coverage")'
julia --color=yes --threads=auto --check-bounds=yes --depwarn=yes --code-coverage=user -e 'import Coverage; import Pkg; Pkg.activate("."); Pkg.test(coverage=true)'
Expand All @@ -66,7 +83,7 @@ jobs:
with:
path-to-lcov: lcov.info
parallel: true
flag-name: julia-${{ matrix.julia-version }}-${{ matrix.os }}-${{ github.event_name }}
flag-name: julia-${{ matrix.julia-version }}-${{ matrix.os }}-${{ matrix.test }}-${{ github.event_name }}

coveralls:
name: Indicate completion to coveralls
Expand Down
21 changes: 15 additions & 6 deletions test/runtests.jl
Expand Up @@ -2,16 +2,25 @@ using SafeTestsets
using Test

ENV["SYMBOLIC_REGRESSION_TEST"] = "true"
TEST_SUITE = get(ENV, "SYMBOLIC_REGRESSION_TEST_SUITE", "all")

@safetestset "Aqua tests" begin
include("test_aqua.jl")
if TEST_SUITE in ("all", "integration")
@safetestset "Aqua tests" begin
include("test_aqua.jl")
end
end

# Trigger extensions:
using LoopVectorization, Bumper, Zygote

@safetestset "Unit tests" begin
include("unittest.jl")
if TEST_SUITE in ("all", "unit")
@safetestset "Unit tests" begin
include("unittest.jl")
end
end
@testset "End to end test" begin
include("full.jl")

if TEST_SUITE in ("all", "integration")
@eval @testset "End to end test" begin
include("full.jl")
end
end

0 comments on commit 7a2998d

Please sign in to comment.