Refactor code for injecting drivers into a library for easier shared use #340
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.22.x | |
- 1.23.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 |