single import pe line #216
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
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pre-commit | |
- name: Lint with pre-commit | |
run: pre-commit run --all-files | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
database_url: | |
- sqlite:///db.sqlite3 | |
- mysql://root:test@127.0.0.1:3306/data_browser | |
- postgres://postgres:test@127.0.0.1:5432/data_browser, | |
services: | |
mysql: | |
image: mysql | |
env: | |
MYSQL_ROOT_PASSWORD: test | |
ports: | |
- 3306:3306 | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: test | |
ports: | |
- 5432:5432 | |
env: | |
DATABASE_URL: ${{ matrix.database_url }} | |
TOX_PARALLEL_NO_SPINNER: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox tox-gh-actions | |
- name: Test with tox | |
run: tox | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-data | |
path: ".coverage.*" | |
coverage: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install coverage[toml] | |
- name: Download coverage data. | |
uses: actions/download-artifact@v2 | |
with: | |
name: coverage-data | |
- name: Combine coverage & fail if it's <100%. | |
run: | | |
python -m coverage combine | |
python -m coverage html | |
python -m coverage report --fail-under=100 | |
- name: Upload HTML report if check failed. | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: html-report | |
path: htmlcov |