-
Notifications
You must be signed in to change notification settings - Fork 10
69 lines (57 loc) · 1.67 KB
/
Copy pathtest.yaml
File metadata and controls
69 lines (57 loc) · 1.67 KB
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
name: Test
on:
workflow_call:
inputs:
nextest-flags:
required: false
type: string
env:
NEXTEST-FLAGS: ${{ inputs.nextest-flags }}
jobs:
build-test-artifacts:
name: Build test artifacts
container:
image: zingodevops/ci-build:011
runs-on: ubuntu-24.04
if: github.event.pull_request.draft == false
env:
RUSTFLAGS: -D warnings
steps:
- name: Checkout repository
uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest@0.9.78
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Build and archive tests
run: cargo nextest archive --verbose --workspace --archive-file nextest-archive.tar.zst
- name: Upload archive
uses: actions/upload-artifact@v5
with:
name: nextest-archive
path: nextest-archive.tar.zst
overwrite: true
run-tests:
name: Run tests
runs-on: ubuntu-24.04
if: github.event.pull_request.draft == false
needs: build-test-artifacts
env:
RUSTFLAGS: -D warnings
container:
image: zingodevops/ci-build:011
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download archive
uses: actions/download-artifact@v6
with:
name: nextest-archive
- name: Run tests
run: |
cargo nextest run --verbose --profile ci --retries 2 --archive-file nextest-archive.tar.zst \
--workspace-remap ./ ${{ env.NEXTEST-FLAGS }}