Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Aug 1, 2024
1 parent c27a1ba commit b07b19d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,33 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
# needed by coveralls
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
source_check:
name: source check
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --editable .[check]
pip install --editable .[check,test]
pip install "coveralls>=3.0.0"
- name: black check
run: |
python -m black --check --diff --color .
- name: black preview
run: |
python -m black --preview --diff --color .
- name: isort check
run: |
python -m isort --check --diff --color .
Expand All @@ -48,22 +47,29 @@ jobs:
run: |
python -m pylint src/anaflow/
- name: coveralls check
run: |
python -m pytest --cov anaflow --cov-report term-missing -v tests/
python -m coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_sdist:
name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: '0'

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

Expand All @@ -76,13 +82,12 @@ jobs:
- name: Run tests
run: |
python -m pytest --cov anaflow --cov-report term-missing -v tests/
python -m coveralls --service=github
- name: Build sdist
run: |
python -m build
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
with:
path: dist
Expand All @@ -92,7 +97,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ doc = [
]
test = ["pytest-cov>=3"]
check = [
"black>=23,<24",
"black>=24,<25",
"isort[colors]<6",
"pylint<3",
"pylint",
]

[project.urls]
Expand Down

0 comments on commit b07b19d

Please sign in to comment.