Skip to content

Commit

Permalink
convert to 3 independent jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanAugust authored Feb 1, 2024
1 parent 8acb559 commit 3cf076e
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint & Build
name: Lint, Test, & Build

on:
push:
Expand All @@ -16,32 +16,48 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: "3.10"
- name: Install dependencies
run: pip install -e '.[linting,testing]'
- name: Lint with flake8
run: flake8 cheetahpy/ --indent-size=4 --select=F,E112,E113,E203,E304,E502,E702,E703,E71,E72,E731,W191,W6 --statistics -j4
run: pip install -e '.[linting]'
# - name: Lint with flake8
# run: flake8 cheetahpy/ --indent-size=4 --select=F,E112,E113,E203,E304,E502,E702,E703,E71,E72,E731,W191,W6 --statistics -j4
- name: Lint with pylint
run: pylint cheetahpy/ --exit-zero # just return the warnings for now

tester:
name: tester
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: pip install -e '.[testing]'
- name: Testing
run: pytest tests/

build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
name: Build on Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install and test
run: |
python -m pip install -U --editable .
python -m pytest tests/

0 comments on commit 3cf076e

Please sign in to comment.