Skip to content

Commit

Permalink
ci: add github lint and test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Sep 19, 2024
1 parent ad13a69 commit cbb2d62
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: test
on:
push:
branches:
- "master"
- "feature/*"
- "hotfix/*"
- "release/*"
- "renovate/*"
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: make setup
- name: Run Linters
run: make lint
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev']
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install dependencies
run: make setup
- name: Run tests
run: make test
env:
PYTEST_ADDOPTS: "--no-header -vv -rN"
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Copyright 2017 Canonical Ltd.
# Copyright 2017,2024 Canonical Ltd.
# Licensed under the LGPLv3, see LICENCE file for details.

[tox]
envlist = lint, py27, py35, docs
# envlist = py27
# If the system has tox < 4.8, installs a newer tox in a venv.
minversion = 4.8

[testenv]
setenv =
Expand Down

0 comments on commit cbb2d62

Please sign in to comment.