Skip to content

Commit

Permalink
Add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rbarrois committed Feb 2, 2024
1 parent 2efd9d0 commit c2191d2
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: ${{ matrix.tox-environment }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
tox-environment:
- lint

env:
TOXENV: ${{ matrix.tox-environment }}

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3

- name: Install dependencies
run: python -m pip install tox

- name: Run
run: tox
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- python-version: "3.8"
- python-version: "3.9"
- python-version: "3.10"
- python-version: "3.11"
- python-version: "3.12"

env:
TOXENV: python-${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install tox

- name: Run tests
run: tox
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[tox]
envlist = py310,py311,py312,lint
envlist =
python-{3.8,3.9,3.10,3.11,3.12}
lint
toxworkdir = {env:TOX_WORKDIR:.tox}

[testenv]
allowlist_externals = make
deps = -rrequirements_dev.txt
commands = make
extras = dev
setenv =
PYTHONAIODEBUG=1

[testenv:lint]
allowlist_externals = make
extras = dev
commands = make lint

0 comments on commit c2191d2

Please sign in to comment.