add ci && format code (#5) #14
Workflow file for this run
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: CI | |
on: [ push, pull_request ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
OS: [ Ubuntu, macOS, Windows ] | |
python-version: [ "3.8" ] | |
include: | |
- os: Ubuntu | |
image: ubuntu-22.04 | |
- os: Windows | |
image: windows-2022 | |
- os: macOS | |
image: macos-12 | |
fail-fast: false | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Static check | |
run: | | |
pip install isort==5.11.5 black==22.12.0 mypy==1.9.0 | |
isort --check . | |
black --check . | |
mypy . | |
- name: Test | |
run: | | |
pip install . | |
pip install pytest coverage | |
coverage run --source=jillw -m pytest -s && coverage report && coverage xml | |
- name: Python Cov | |
uses: codecov/codecov-action@v2 | |
with: | |
files: coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true |