CI #589
This file contains hidden or 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: CI | |
"on": | |
push: | |
branches: | |
- "*" | |
pull_request: | |
schedule: | |
- cron: 0 0 * * 0 | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: astral-sh/ruff-action@v3 | |
- uses: astral-sh/ruff-action@v3 | |
with: | |
args: format --check | |
test: | |
strategy: | |
matrix: | |
include: | |
- netbox: v4.0 | |
- netbox: v4.1 | |
- netbox: v4.2 | |
- netbox: v4.3 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v6 | |
with: | |
enable-cache: true | |
- name: Setup Python 3.12 | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: pyproject.toml | |
- name: Ensure playwright browsers are installed | |
run: uv run playwright install --with-deps | |
- name: Run uv build | |
run: uv build | |
- name: Run test_setup.sh | |
run: ./tests/test_setup.sh | |
env: | |
NETBOX_CONTAINER_TAG: ${{ matrix.netbox }} | |
- name: Run pytest | |
run: | | |
uv run pytest --tracing=retain-on-failure -v | |
- name: Upload Playwright traces | |
uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-traces | |
path: test-results/ | |
- name: Show Docker logs | |
if: ${{ always() }} | |
run: docker compose logs | |
working-directory: ./tests/docker/ |