-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (73 loc) · 2.14 KB
/
ci.yml
File metadata and controls
88 lines (73 loc) · 2.14 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
scripts-tests:
name: scripts tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Run scripts unit tests
run: |
python3 -m unittest \
scripts.tests.test_ci_workflows \
scripts.tests.test_verify_version_changelog \
scripts.tests.test_verify_release_consistency \
scripts.tests.test_resolve_release_tag \
scripts.tests.test_provider_health_report \
scripts.tests.test_package_release \
scripts.tests.test_onboard_metrics_report
versioning-guard:
name: versioning guard (PR)
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify version/changelog rule
run: |
python3 scripts/verify_version_changelog.py \
--base-ref "${{ github.event.pull_request.base.sha }}" \
--head-ref "${{ github.sha }}"
test:
name: cargo test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test --workspace --locked
docs:
name: docs build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
cache-dependency-path: requirements-docs.txt
- name: Install docs dependencies
run: pip install -r requirements-docs.txt
- name: Build docs
run: python -m mkdocs build --strict