Skip to content

github: only test on 22.04 (DEBUG) #54

github: only test on 22.04 (DEBUG)

github: only test on 22.04 (DEBUG) #54

Workflow file for this run

name: Tests
on:
- push
- pull_request
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Lint shell files
uses: ludeeus/action-shellcheck@master
- name: Install dependencies
run: |
pip install --upgrade pip tox
- name: Lint Python files
run: |
tox -e lint
- name: Typecheck Python files
run: |
tox -e check
tests:
name: Tests
strategy:
matrix:
os: ["22.04"]
runs-on: ubuntu-${{ matrix.os }}
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
set -x
sudo apt-get autopurge moby-containerd docker uidmap -y
sudo ip link delete docker0
sudo nft flush ruleset || sudo iptables -I DOCKER-USER -j ACCEPT
sudo snap refresh lxd || sudo snap install lxd
sudo adduser "$USER" lxd
sudo lxd init --auto
sudo apt-get update
sudo apt-get install python3-pip
pip install --upgrade pip tox codecov
- name: Coverage
run: |
tox -e coverage
codecov
- name: Integration
run: |
sudo -g lxd integration/run-integration-tests
publish:
name: Publish
runs-on: ubuntu-22.04
if: startsWith(github.event.ref, 'refs/tags')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.ref }}
generateReleaseNotes: true