Skip to content

System tests

System tests #204

Workflow file for this run

name: Tests
on:
- push
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-tests:
name: Code tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
- name: Install dependencies
run: |
sudo add-apt-repository ppa:dqlite/dev -y --no-update
sudo apt-get update
sudo apt-get install --no-install-recommends -y libdqlite-dev pkg-config
- name: Update gomod
working-directory: microcloud
run: make update-gomod
- name: Run static analysis
working-directory: microcloud
run: make check-static
system-tests:
name: System tests
runs-on: [self-hosted, linux, X64, two-xlarge, jammy]
env:
SNAPCRAFT_BUILD_ENVIRONMENT: "lxd"
SKIP_SETUP_LOGS: 1
CONCURRENT_SETUP: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Clear FORWARD firewall rules
run: |
# Docker can inject rules causing firewall conflicts
sudo iptables -P FORWARD ACCEPT || true
sudo ip6tables -P FORWARD ACCEPT || true
sudo iptables -F FORWARD || true
sudo ip6tables -F FORWARD || true
- name: Install dependencies
run: |
sudo snap refresh
sudo snap set lxd daemon.group=adm
sudo lxd init --auto
sudo snap install snapcraft --classic
snap list
- name: Build snaps
run: snapcraft
- name: Run system tests
run: |
export MICROCLOUD_SNAP_PATH=$(printf "%s/%s" $(pwd) microcloud_*.snap)
cd microcloud
make check-system
cd -
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: snaps
path: "*.snap"
retention-days: 5
spellcheck:
name: Spelling check (documentation)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Aspell
run: |
sudo apt-get install aspell aspell-en
- name: Install the doc framework
working-directory: ./doc
run: |
make install
- name: Build docs and run spellchecker
working-directory: ./doc
run: |
make spelling
woke:
name: Inclusive language check (documentation)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: woke
uses: get-woke/woke-action@v0
with:
# Cause the check to fail on any broke rules
fail-on-error: true
workdir: doc
woke-args: "*.rst *.md **/*.rst **/*.md -c https://github.com/canonical-web-and-design/Inclusive-naming/raw/main/config.yml"
linkcheck:
name: Link check (documentation)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install the doc framework
working-directory: ./doc
run: |
make install
- name: Run linkchecker
working-directory: ./doc
run: |
make linkcheck