Update requirements.txt #139
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: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
build: [linux_3.8, windows_3.8, mac_3.8, linux_3.7] | |
include: | |
- build: linux_3.8 | |
os: ubuntu-latest | |
python: 3.8 | |
- build: windows_3.8 | |
os: windows-latest | |
python: 3.8 | |
- build: mac_3.8 | |
os: macos-latest | |
python: 3.8 | |
- build: linux_3.7 | |
os: ubuntu-latest | |
python: 3.7 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -r requirements.txt | |
# test all the builds apart from linux_3.8... | |
- name: Test with pytest | |
if: matrix.build != 'linux_3.8' | |
run: pytest | |
# only do the test coverage for linux_3.8 | |
- name: Produce coverage report | |
if: matrix.build == 'linux_3.8' | |
run: pytest --cov=fastapi_async_sqlalchemy --cov-report=xml | |
- name: Upload coverage report | |
if: matrix.build == 'linux_3.8' | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: pip install flake8 | |
- name: Run flake8 | |
run: flake8 --count . | |
format: | |
name: format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
# isort needs all of the packages to be installed so it can | |
# tell which are third party and which are first party | |
run: pip install -r requirements.txt | |
- name: Check formatting of imports | |
run: isort --check-only --diff --verbose | |
- name: Check formatting of code | |
run: black . --check --diff |