-
Notifications
You must be signed in to change notification settings - Fork 10
97 lines (95 loc) · 2.8 KB
/
pr-workflow.yaml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: PR Checks Workflow
on:
pull_request:
types:
- opened
- synchronize
- reopened
branches-ignore:
- main
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up to run
uses: ./.github/actions/weave
- name: Run Code Linting
run: make -k lint
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up to run
uses: ./.github/actions/weave
- name: Run unit tests
run: make unit-tests
env:
TEST_RESULTS_DIR: workspace/test-results
- name: Generate Test Coverage
run: make coverage-unit
- uses: actions/upload-artifact@v4
with:
name: unit-test-results
include-hidden-files: true
path: |
workspace/test-results
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up to run
uses: ./.github/actions/weave
- name: Run Integration Tests
run: make integration-tests
env:
TEST_RESULTS_DIR: workspace/test-results
- name: Generate Test Coverage
run: make coverage-integration
- uses: actions/upload-artifact@v4
with:
name: integration-test-results
include-hidden-files: true
path: |
workspace/test-results
test-coverage-checks:
needs: [unit-tests, integration-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up to run
uses: ./.github/actions/weave
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: workspace/test-results/
merge-multiple: true
- name: Evaluate Minimum Test Coverage
run: make test-coverage-check
env:
TEST_RESULTS_DIR: workspace/test-results
docs-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Build docs
run: |
mkdir -p bin
echo "PATH=$(pwd)/bin:$PATH" >> $GITHUB_ENV
curl -sSL \
https://github.com/rust-lang/mdBook/releases/download/v0.4.24/mdbook-v0.4.24-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz --directory=bin
curl -sSL \
https://github.com/badboy/mdbook-mermaid/releases/download/v0.12.6/mdbook-mermaid-v0.12.6-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz --directory=bin
- name: Build docs
run: |
mdbook-mermaid install ./
./dev/make-all-docs.sh
mkdir workspace
cp -r ./book workspace/doc
- name: Upload documentation as an artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: workspace/doc