-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (39 loc) · 1.32 KB
/
ci.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
name: Test code
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
name: Tests
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
# Setup
- run: sudo apt-get install binutils sbsigntool
# directory is needed for arch linux tests
- run: sudo mkdir -p /etc/mkinitcpio.d
# Setup workspace
- run: set -e
- run: python3 --version
- run: python3 -m venv .venv --system-site-packages
- run: . .venv/bin/activate
- run: pip3 install --upgrade setuptools pip
- run: pip3 install pycodestyle pyflakes
- run: pip3 install -e . --no-deps
# Run Tests
- run: python3 -m unittest tests/unit/tests.py
# Check syntax
- run: sudo apt-get install shellcheck
- run: shellcheck usr/lib/initcpio/install/verity-squash-root
usr/lib/verity-squash-root/*
usr/lib/dracut/modules.d/99verity-squash-root/*.sh
usr/share/bash-completion/completions/verity-squash-root
- run: pip3 install flake8 mypy
- run: flake8 src/ tests/ setup.py
- run: mypy src