-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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-pip python3-pytest python3-pytest-flake8 mypy | ||
sudo pip install . | ||
- name: Run py.test | ||
run: py.test-3 --flake8 | ||
|
||
- name: Run mypy | ||
run: mypy --show-error-codes --namespace-packages src tests |
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