Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix workflows #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python: [3.7, 3.8, 3.9]
python-version: ['3.8', '3.9', '3.10']

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4

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

- name: Install mypy
run: |
Expand All @@ -33,19 +35,19 @@ jobs:
run: pip install typing-extensions

- name: Run mypy
run: mypy --python-version ${{ matrix.python }} -p hid_parser
run: mypy --python-version ${{ matrix.python-version }} -p hid_parser


pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.9

- name: Run pre-commit
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v3.0.0
18 changes: 10 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,34 @@ jobs:
strategy:
fail-fast: false
matrix:
python: [3.7, 3.8, 3.9]
python-version: ['3.8', '3.9', '3.10']

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

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

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

- name: Install nox
run: |
pip install nox
nox --version

- name: Run tests
run: nox -s test-${{ matrix.python }}
run: nox -s test-${{ matrix.python-version }}

- name: Send coverage report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
env:
PYTHON: ${{ matrix.python }}
PYTHON: ${{ matrix.python-version }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: PYTHON
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ repos:
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-isort
rev: master
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
language_version: python3.9
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: ['flake8-per-file-ignores']
language_version: python3.7
language_version: python3.9
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def mypy(session):
session.run('mypy', '-p', 'hid_parser')


@nox.session(python=['3.7', '3.8', '3.9'])
@nox.session(python=['3.8', '3.9', '3.10'])
def test(session):
htmlcov_output = os.path.join(session.virtualenv.location, 'htmlcov')
xmlcov_output = os.path.join(session.virtualenv.location, f'coverage-{session.python}.xml')
Expand Down