Merge pull request #72 from nullr0ute/ci-el9 #354
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
on: | |
- push | |
- pull_request | |
name: Continuous integration | |
jobs: | |
static_analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install tools | |
run: | | |
pip install black bandit | |
- name: Run black check | |
run: | | |
black --check . | |
- name: Run bandit check | |
run: | | |
bandit -ll -r . | |
test_ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install apt deps | |
run: | | |
sudo apt-get install -y \ | |
python3 librpm-dev python3-rpm python3-pip python3-setuptools python3-dateutil \ | |
python3-requests python3-gssapi python3-pyxattr rpm valgrind ima-evm-utils | |
- name: Install pip deps | |
run: | | |
pip3 install koji | |
- name: Build insertlib | |
run: | | |
python3 setup.py build_ext -i | |
- name: Run test | |
run: | | |
# We allow insertlib to be found in the valgrind output because the RPM version on Ubuntu is doing | |
# weird things. | |
ONLY_ALTERNATIVE_EVMCTL_CHECK=true PRINT_VALGRIND_LOG=1 VALGRIND_ALLOW_INSERTLIB=true python3 test.py | true | |
tests_fedora: | |
runs-on: ubuntu-latest | |
container: fedora:latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install deps | |
run: | | |
dnf install -y python3-koji python3-pyxattr python3-rpm make gcc rpm-sign cpio python3-setuptools rpm-devel python3-devel python3-cryptography valgrind | |
- name: Build insertlib | |
run: | | |
python3 setup.py build_ext -i | |
- name: Run tests | |
run: PRINT_VALGRIND_LOG=1 python3 test.py | |
tests_centos_8: | |
runs-on: ubuntu-latest | |
container: quay.io/centos/centos:stream8 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install deps | |
run: | | |
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | |
dnf install -y python3-koji python3-rpm make gcc rpm-sign cpio python3-setuptools rpm-devel python3-devel python3-cryptography valgrind | |
pip3 install pyxattr | |
- name: Build insertlib | |
run: | | |
python3 setup.py build_ext -i | |
- name: Run tests | |
run: PRINT_VALGRIND_LOG=1 python3 test.py | |
tests_centos_9: | |
runs-on: ubuntu-latest | |
container: quay.io/centos/centos:stream9 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install deps | |
run: | | |
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm | |
crb enable | |
dnf install -y python3-koji python3-rpm make gcc rpm-sign cpio python3-setuptools rpm-devel python3-devel python3-cryptography valgrind python3-pyxattr crypto-policies-scripts | |
update-crypto-policies --set DEFAULT:SHA1 | |
- name: Build insertlib | |
run: | | |
python3 setup.py build_ext -i | |
- name: Run tests | |
run: PRINT_VALGRIND_LOG=1 python3 test.py |