Test #195
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: Test | |
on: | |
workflow_dispatch: | |
jobs: | |
main: | |
strategy: | |
matrix: | |
_: | |
- python: 3.11 | |
docker: docker | |
- python: 3.8 | |
docker: podman | |
suite: | |
- tests/test_mirror.py tests/test_docker.py tests/test_project.py tests/test_desktopfile.py tests/test_docs.py | |
- tests/test_alpine.py tests/test_completion.py | |
- tests/test_arch.py tests/test_configuration.py | |
- tests/test_manjaro.py | |
- tests/test_fedora.py | |
- tests/test_void.py | |
- tests/test_opensuse.py | |
- tests/test_debian.py | |
- tests/test_ubuntu.py | |
fail-fast: false | |
runs-on: ubuntu-latest | |
env: | |
FORCE_COLOR: 1 | |
POLYCOTYLUS_VERBOSITY: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix._.python }} | |
- name: Install recent podman | |
if: matrix._.docker == 'podman' | |
# Even the latest version of podman available on the latest version of | |
# Ubuntu is hopelessly out of date. Install from the semi-official | |
# PPA. https://podman.io/docs/installation#ubuntu | |
run: | | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key \ | |
| gpg --dearmor \ | |
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\ | |
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \ | |
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null | |
sudo apt-get update | |
sudo apt-get -y install podman | |
- run: | | |
if grep -E 'alpine|manjaro' <<< '${{ matrix.suite }}' ; then | |
sudo apt-get update | |
sudo apt-get install -y qemu-user-static | |
fi | |
- run: sudo apt-get update && sudo apt-get install -y fish | |
- run: python -m pip install -U pip setuptools wheel | |
- run: pip install -e .[test] | |
- run: polycotylus --configure docker=${{ matrix._.docker }} | |
- run: pytest --cov-fail-under=0 -sv ${{ matrix.suite }} | |
- run: mv .coverage .coverage-$(uuidgen) | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: .coverage-* | |
coverage: | |
runs-on: ubuntu-latest | |
needs: main | |
steps: | |
- uses: actions/checkout@v3 | |
- run: pip install coverage | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage | |
- run: coverage combine .coverage-* | |
- run: coverage report |