-
Notifications
You must be signed in to change notification settings - Fork 95
74 lines (64 loc) · 2.38 KB
/
ci-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#
# This workflow is triggered by scheduler or on-demand to run all the tests with the code coverage enabled and using the self-hosted GitHub runner.
# Test coverage report is attached to the current job execution results in a form of Zip archive.
#
name: Nightly tests with the code coverage
on:
schedule:
- cron: "0 0 * * *" # every day at midnight
workflow_dispatch: {}
env:
# https://doc.rust-lang.org/cargo/reference/profiles.html#release
RUSTFLAGS: -Coverflow-checks=y -Cdebug-assertions=y
# https://doc.rust-lang.org/cargo/reference/profiles.html#incremental
CARGO_INCREMENTAL: 1
# https://nexte.st/book/pre-built-binaries.html#using-nextest-in-github-actions
CARGO_TERM_COLOR: always
# 30 MB of stack for Keccak tests
RUST_MIN_STACK: 31457280
jobs:
run_tests:
name: Run all tests with the code coverage
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust_toolchain_version: ["1.74"]
# FIXME: currently not available for 5.0.0.
# It might be related to boxroot dependency, and we would need to bump
# up the ocaml-rs dependency
ocaml_version: ["4.14"]
os: ["hetzner-1"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ matrix.rust_toolchain_version }}
- name: Use shared OCaml setting up steps
uses: ./.github/actions/ocaml-shared
with:
ocaml_version: ${{ matrix.ocaml_version }}
- name: Install test dependencies
run: |
make install-test-deps
- name: Run all tests with the code coverage
run: |
eval $(opam env)
make clean
make nextest-all-with-coverage
make test-doc-with-coverage
make generate-test-coverage-report
- name: Use shared code coverage summary
uses: ./.github/actions/coverage-summary-shared
- name: Upload the HTML test coverage report
uses: actions/upload-artifact@v4
continue-on-error: true
if: always()
with:
if-no-files-found: ignore
name: test-coverage-html-report-${{ matrix.rust_toolchain_version }}-${{ matrix.os }}
path: target/coverage/
retention-days: 30