-
Notifications
You must be signed in to change notification settings - Fork 20
48 lines (39 loc) · 1.15 KB
/
system-test.yml
File metadata and controls
48 lines (39 loc) · 1.15 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
name: System tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "feature/*" ]
workflow_dispatch: { }
jobs:
toml-cases:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Checkout code
uses: actions/checkout@v4
- name: Build mdq
run: cargo build
- name: Install toml2json
run: command -v toml2json || cargo install toml2json
- name: Run tests
run: |
set -euo pipefail
test_failures=0
# Run each test toml file
for test_file in tests/md_cases/*.toml; do
./scripts/system_test ./target/debug/mdq "$test_file" || test_failures=$((test_failures + 1))
done
# Report any failures
if [ "$test_failures" -ne 0 ]; then
echo "::error title=failures::$test_failures test(s) failed"
exit 1
fi