Skip to content

chore(hatch): hatch builder + ci + fix imports #1

chore(hatch): hatch builder + ci + fix imports

chore(hatch): hatch builder + ci + fix imports #1

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade hatch
- name: Run tests
run: |
hatch run +py=${{ matrix.py || matrix.python-version }} test:with-coverage
- name: Upload Codecov Results
if: success()
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: ${{ matrix.os }}/${{ matrix.python-version }}
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python -m pip install --upgrade hatch
- name: Check with black + isort
if: always()
run: hatch run style:format && git diff --exit-code
- name: Check with flake8
if: always()
run: hatch run style:lint
- name: Check with mypy
if: always()
run: hatch run types:check
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Hatch
run: |
python -m pip install -U hatch
- name: Build package
run: |
hatch build