From d70f7cf66d8e34d36b5b3c1c7ccec5ca5f88aaad Mon Sep 17 00:00:00 2001 From: Michael Sprengel Date: Fri, 24 Nov 2023 09:26:54 +0100 Subject: [PATCH] Initial pipeline commit --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3acca5d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Test + +on: + pull_request: + push: + branches: + - main + - add-ci-pipeline + release: + types: + - published + +jobs: + test: + runs-on: ubuntu-latest + + env: + DATABASE_URL: postgres://user:password@localhost:5432/glvd_test + + services: + postgres: + image: postgres + env: + POSTGRES_DB: glvd_test + POSTGRES_USER: user + POSTGRES_PASSWORD: password + ports: + - 5432:5432 + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Prepare test utilities + run: | + sudo apt update + sudo apt install -y ca-certificates python3-pytest python3-pytest-flake8 mypy + + - name: Run py.test + run: py.test-3 --flake8 + + - name: Run mypy + run: mypy --show-error-codes --namespace-packages src tests \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9f8395d..d3659e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ pytest-asyncio = ">=0.20" requests-mock = ">=1.9" [tool.pytest.ini_options] -minversion = "7.0" +minversion = "6.0" addopts = [ "--import-mode=importlib", ]