Add black-format checking to CI. #23
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: Test | |
on: push | |
jobs: | |
Test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
defaults: | |
run: | |
shell: bash | |
name: ${{ matrix.os }} with py${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set Project Name | |
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: bigladder/github-actions/setup-python-poetry@main | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Lint with Pylint | |
run: | | |
poetry run pylint ${{env.REPOSITORY_NAME}} | |
poetry run pylint test/*.py | |
continue-on-error: true | |
- name: Static type checking | |
run: | | |
poetry run mypy ${{env.REPOSITORY_NAME}} | |
continue-on-error: true | |
- name: Test | |
run: | | |
source $VENV | |
poetry run pytest | |