Skip to content

Commit

Permalink
Split tox in CI (#220)
Browse files Browse the repository at this point in the history
* Split tox in CI

* There is no need to run tests if linting are failing

* rename

* Update .github/workflows/ci.yml

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
  • Loading branch information
ludeeus and MartinHjelmare authored Nov 24, 2023
1 parent 7965290 commit f72ad28
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,26 @@ on:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Python 3.8
uses: actions/setup-python@v4.7.1
with:
python-version: "3.8"
- name: Install dependencies
shell: bash
run: |
pip install tox
- name: Run Tox
shell: bash
run: |
tox -e lint,black
build:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version:
Expand All @@ -20,7 +38,7 @@ jobs:
- "3.11"
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Python 3.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -31,4 +49,4 @@ jobs:
- name: Run Tox
shell: bash
run: |
tox
tox -e tests

0 comments on commit f72ad28

Please sign in to comment.