CI Improvements #453
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: litevm test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
commit-hooks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
name: Set up Python | |
with: | |
python-version: '3.x' | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Run pre-commit hooks | |
run: pre-commit run --all-files --show-diff-on-failure | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
# OL7 and OL8 use 3.6. OL9 uses 3.9. Also test on the latest. | |
python-minor: ["6", "9", "12"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.${{ matrix.python-minor }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install qemu-kvm zstd gzip bzip2 cpio busybox-static fio | |
sudo wget -O /usr/bin/rpm2cpio https://github.com/rpm-software-management/rpm/raw/rpm-4.19.0-release/scripts/rpm2cpio.sh | |
echo '0403da24a797ccfa0cfd37bd4a6d6049370b9773e558da6173ae6ad25f97a428 /usr/bin/rpm2cpio' | sha256sum -c - | |
sudo chmod 755 /usr/bin/rpm2cpio | |
- name: Setup test environment | |
# Pinned virtualenv and tox are for the last versions which support | |
# detecting Python 3.6 and running tests on it. | |
run: | | |
python -m venv venv | |
venv/bin/pip install -r testing/requirements-litevm.txt | |
- name: Run tests | |
run: | | |
venv/bin/python -m testing.litevm.vm --delete-after-test |