Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up CI tests #42

Merged
merged 4 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 58 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ permissions:
jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -45,10 +45,24 @@ jobs:
- '1.10'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
trixi_test:
- tree_1d
- tree_2d
- structured_2d
- unstructured_2d
- unit
- upstream
include:
- version: '1.10'
os: macos-latest
arch: aarch64
trixi_test: upstream
- version: '1.10'
os: windows-latest
arch: x64
trixi_test: upstream
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand All @@ -62,19 +76,57 @@ jobs:
uses: julia-actions/julia-runtest@v1
with:
coverage: false
env:
PYTHON: ""
TRIXI_TEST: ${{ matrix.trixi_test }}

test_coverage:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: coverage - ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
trixi_test:
- tree_1d
- tree_2d
- structured_2d
- unstructured_2d
- unit
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- name: Run tests with coverage
uses: julia-actions/julia-runtest@v1
with:
coverage: true
- uses: julia-actions/julia-processcoverage@v1
env:
PYTHON: ""
TRIXI_TEST: ${{ matrix.trixi_test }}
- name: Process coverage results
uses: julia-actions/julia-processcoverage@v1
with:
directories: src,examples
- uses: codecov/codecov-action@v4
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # now required for public repos
- uses: coverallsapp/github-action@v2
- name: Upload coverage report to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
14 changes: 13 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@ using Test
const TRIXI_TEST = get(ENV, "TRIXI_TEST", "all")

@time @testset "TrixiShallowWater.jl tests" begin
@time if TRIXI_TEST == "all"
@time if TRIXI_TEST == "all" || TRIXI_TEST == "tree_1d"
include("test_tree_1d.jl")
end

@time if TRIXI_TEST == "all" || TRIXI_TEST == "tree_2d"
include("test_tree_2d.jl")
end

@time if TRIXI_TEST == "all" || TRIXI_TEST == "unstructured_2d"
include("test_unstructured_2d.jl")
end

@time if TRIXI_TEST == "all" || TRIXI_TEST == "structured_2d"
include("test_structured_2d.jl")
end

@time if TRIXI_TEST == "all" || TRIXI_TEST == "unit"
include("test_unit.jl")
end

Expand Down
Loading