-
Notifications
You must be signed in to change notification settings - Fork 173
84 lines (68 loc) · 1.86 KB
/
tests.yml
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
name: Tests
on:
- push
- pull_request
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-tests:
name: Code tests
strategy:
fail-fast: false
matrix:
go:
- 1.20.x
- 1.21.x
os:
- ubuntu-20.04
- ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v3
if: github.event_name == 'pull_request'
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y squashfs-tools
- name: Update Go modules
run: make update-gomod
- name: Run static analysis
run: make static-analysis
- name: Unit tests (all)
run: make check
documentation:
name: Documentation tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install aspell aspell-en
sudo snap install mdl
- name: Run markdown linter
run: |
make doc-lint
- name: Run spell checker
run: |
make doc-spellcheck
- name: Run inclusive naming checker
uses: get-woke/woke-action@v0
with:
fail-on-error: true
woke-args: "*.md **/*.md -c https://github.com/canonical-web-and-design/Inclusive-naming/raw/main/config.yml"
- name: Run link checker
# This can fail intermittently due to external resources being unavailable.
continue-on-error: true
run: |
make doc-linkcheck