replace black to ruff format (#6) #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linting and Unit Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ["3.12"] | |
os: ["ubuntu-22.04"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip | |
python -m pip install -e ".[dev]" | |
- name: Check linting | |
run: | | |
make lint | |
- name: Test with pytest | |
run: | | |
coverage run -m pytest | |
echo "# Python coverage report" >> $GITHUB_STEP_SUMMARY | |
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | |
- name: Build a wheel | |
run: | | |
make build | |
- name: Upload wheel | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheel | |
path: dist/*.whl |