Skip to content

Commit

Permalink
Update GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
avalentino committed Mar 11, 2024
1 parent feb5372 commit f8d54c7
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
permissions:
contents: read

env:
PACKAGE: asfsmd

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,7 +24,7 @@ jobs:
submodules: 'true'

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"

Expand All @@ -36,7 +39,7 @@ jobs:
python -m twine check dist/*
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: |
Expand All @@ -49,7 +52,7 @@ jobs:
needs: build
strategy:
matrix:
python-version: ["3.7", "3.11"] # aiohttp does not have wheels for 3.12
python-version: ["3.8", "3.x"] # aiohttp does not have wheels for 3.12
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand All @@ -59,13 +62,13 @@ jobs:
submodules: 'true'

- name: Get distribution
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist

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

Expand All @@ -83,31 +86,29 @@ jobs:
- name: Test
run: |
python -m pytest --cov=asfsmd --cov-report=html --cov-report=term
python -m pytest --cov=${PACKAGE} --cov-report=html --cov-report=term
lint:
runs-on: ubuntu-latest
env:
PACKAGE: asfsmd

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install lint dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pydocstyle isort black
if [ -f requirements-lint.txt ]; then pip install -r requirements-lint.txt; fi
- name: Lint (flake8)
run: |
python -m flake8 --count --statistics ${PACKAGE}
python -m flake8 --count --show-source --statistics ${PACKAGE}
- name: Lint (pydocstyle)
run: |
Expand Down

0 comments on commit f8d54c7

Please sign in to comment.