-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (72 loc) · 2.25 KB
/
Copy pathtest.yml
File metadata and controls
77 lines (72 loc) · 2.25 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
name: Tests
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
unittest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run unit tests (stdlib only)
run: python -m unittest discover -s tests -v
core-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pinned CodeBoarding release
shell: bash
run: |
set -euo pipefail
requirement="$(sed -n "s/.*'\(codeboarding==[^']*\)'.*/\1/p" action.yml)"
if [ -z "$requirement" ]; then
echo "Could not resolve the CodeBoarding requirement from action.yml" >&2
exit 1
fi
python -m pip install --disable-pip-version-check "$requirement"
- name: Check the provider table against the installed release
run: python -m unittest tests.test_provider_table_drift -v
- name: Render with the installed CodeBoarding release
run: >-
python scripts/diff_to_mermaid.py
--base .codeboarding/analysis.json
--head .codeboarding/analysis.json
--out "${RUNNER_TEMP}/diagram.md"
--direction LR
--render-depth 1
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install pre-commit
run: python -m pip install pre-commit==3.8.0
- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck
- name: Install actionlint
run: go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.7
- name: Run pre-commit
run: pre-commit run --all-files
- name: Run actionlint
run: actionlint
- name: Run shellcheck
run: shellcheck scripts/run_local.sh