Skip to content

Commit

Permalink
Tooling(GH Actions): Define action to run tox tests/linters
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarnett committed Aug 23, 2024
1 parent 80ab8c1 commit 7f43adf
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ root = true
indent_style = space
indent_size = 4
max_line_length = 80

[*.{yml,yaml}]
indent_size = 2
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests (tox)

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
test:
name: test with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install tox
run: python -m pip install tox-gh>=1.2
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ deps = pytest
commands=py.test -vv --cov=./gcalcli --pyargs tests {posargs}
coverage html
ruff check

[gh]
python =
3.12 = py312, type, lint
3.11 = py311
3.10 = py310
3.9 = py39
3.8 = py38

0 comments on commit 7f43adf

Please sign in to comment.