@@ -67,21 +67,43 @@ jobs:
67
67
echo "Julia version: ${{ matrix.version }}"
68
68
echo "Number of threads: ${{ matrix.num_threads }}"
69
69
echo "Test arguments: ${{ matrix.test-args }}"
70
+ - name : (De)activate coverage analysis
71
+ run : echo "COVERAGE=${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.num_threads == 2 }}" >> "$GITHUB_ENV"
72
+ shell : bash
70
73
- uses : actions/checkout@v4
71
74
- uses : julia-actions/setup-julia@v2
72
75
with :
73
76
version : ' ${{ matrix.version }}'
74
77
arch : ${{ matrix.arch }}
75
- - uses : actions/cache@v4
76
- env :
77
- cache-name : cache-artifacts
78
- with :
79
- path : ~/.julia/artifacts
80
- key : ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
81
- restore-keys : |
82
- ${{ runner.os }}-test-${{ env.cache-name }}-
83
- ${{ runner.os }}-test-
84
- ${{ runner.os }}-
85
- - uses : julia-actions/julia-buildpkg@latest
78
+ - uses : julia-actions/cache@v1
79
+ - uses : julia-actions/julia-buildpkg@v1
80
+ # TODO: Use julia-actions/julia-runtest when test_args are supported
81
+ # Custom calls of Pkg.test tend to miss features such as e.g. adjustments for CompatHelper PRs
82
+ # Ref https://github.com/julia-actions/julia-runtest/pull/73
86
83
- name : Call Pkg.test
87
- run : julia --color=yes --depwarn=yes --check-bounds=yes --threads=${{ matrix.num_threads }} --project=@. -e 'import Pkg; Pkg.test(; test_args=ARGS)' -- ${{ matrix.test-args }}
84
+ run : julia --color=yes --inline=yes --depwarn=yes --check-bounds=yes --threads=${{ matrix.num_threads }} --project=@. -e 'import Pkg; Pkg.test(; coverage=parse(Bool, ENV["COVERAGE"]), test_args=ARGS)' -- ${{ matrix.test-args }}
85
+ - uses : julia-actions/julia-processcoverage@v1
86
+ if : ${{ env.COVERAGE }}
87
+ - uses : codecov/codecov-action@v4
88
+ if : ${{ env.COVERAGE }}
89
+ with :
90
+ fail_ci_if_error : true
91
+ token : ${{ secrets.CODECOV_TOKEN }}
92
+ file : lcov.info
93
+ - uses : coverallsapp/github-action@v2
94
+ if : ${{ env.COVERAGE }}
95
+ with :
96
+ github-token : ${{ secrets.GITHUB_TOKEN }}
97
+ path-to-lcov : lcov.info
98
+ flag-name : run-${{ join(matrix.*, '-') }}
99
+ parallel : true
100
+
101
+ finish :
102
+ needs : test
103
+ if : ${{ always() }}
104
+ runs-on : ubuntu-latest
105
+ steps :
106
+ - name : Coveralls Finished
107
+ uses : coverallsapp/github-action@v2
108
+ with :
109
+ parallel-finished : true
0 commit comments