Update actions/checkout action to v4 #314
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: | |
branches: | |
- stable | |
- develop | |
pull_request: | |
branches: | |
- stable | |
- develop | |
name: Tests | |
jobs: | |
misc_tests: | |
name: Misc tests | |
container: fedorapython/fedora-python-tox:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Mark the directory as safe for git | |
run: git config --global --add safe.directory $PWD | |
- name: Install poetry | |
run: python3 -m pip install --upgrade poetry | |
- name: Run tests | |
run: tox -e ${{ matrix.tox_env }} | |
strategy: | |
matrix: | |
tox_env: | |
- checks | |
- licenses | |
runs-on: ubuntu-latest | |
unit_test: | |
name: Unit tests | |
container: fedorapython/fedora-python-tox:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
dnf install -y rust cargo openssl-devel | |
python3 -m pip install poetry>=1.3.0 | |
- name: Install dependencies on Python 3.6 | |
if: ${{ matrix.tox_env == 'py36-unittest' }} | |
run: | | |
python3 -m pip install "cryptography<41.0.0" "virtualenv<20.18" | |
- name: Run tests | |
run: tox -e ${{ matrix.tox_env }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
name: ${{ matrix.tox_env }} | |
flags: unittests | |
env_vars: PYTHON | |
fail_ci_if_error: true | |
strategy: | |
matrix: | |
tox_env: | |
- py36-unittest | |
- py37-unittest | |
- py38-unittest | |
- py39-unittest | |
- py310-unittest | |
runs-on: ubuntu-latest | |
integration_test: | |
name: Integration tests | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install RabbitMQ | |
uses: mer-team/rabbitmq-mng-action@v1.2 | |
with: | |
RABBITMQ_TAG: "3-management-alpine" | |
- name: Install Tox | |
run: pip install tox poetry>=1.2 | |
- name: Run integration tests | |
# Run tox using the version of Python in `PATH` | |
run: tox -e py-integration | |
strategy: | |
matrix: | |
python: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
runs-on: ubuntu-latest |