chore: Ignore ISC001 to avoid formatter warning #304
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: | |
build: | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' # Google Colaboratory uses Python 3.10 | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- run: pip install .[test] | |
- env: | |
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres | |
# https://jupyter-core.readthedocs.io/en/stable/changelog.html#migrate-to-standard-platform-directories | |
JUPYTER_PLATFORM_DIRS: 1 | |
# The unit tests are run with ipython, as the code requires an iPython instance, like in a notebook. | |
# However, ipython always returns exit code 0. | |
# https://github.com/OpenDataServices/flatten-tool/pull/458 | |
run: | | |
ipython -m pytest -- -W error -W ignore::DeprecationWarning:ijson.compat --cov ocdskingfishercolab > pytest.out | |
cat pytest.out | |
[ -z "$(grep SystemExit pytest.out)" ] | |
- uses: coverallsapp/github-action@v2 | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432/tcp |