Merge pull request #912 from cderici/register-custom-pytest-marks #421
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: Testing | |
on: [push, pull_request] | |
jobs: | |
lint: | |
name: Linter | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run linter | |
run: tox -e lint | |
unit-tests: | |
needs: lint | |
name: Unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run unit tests | |
run: tox -e py3 | |
integration: | |
name: Integration | |
needs: [lint, unit-tests] | |
timeout-minutes: 120 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup operator environment | |
uses: charmed-kubernetes/actions-operator@main | |
with: | |
provider: lxd | |
juju-channel: 2.9/stable | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run integration | |
# Force one single concurrent test | |
run: tox -e integration -- -n 1 |