-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add unit and integration test checks
- Loading branch information
1 parent
113e787
commit 8f7855f
Showing
3 changed files
with
45 additions
and
0 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,42 @@ | ||
name: Open Prices unit and integration tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- "**/app/**" | ||
- "pyproject.toml" | ||
- "poetry.lock" | ||
- "tests/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
unit-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.11" | ||
|
||
steps: | ||
#---------------------------------------------- | ||
# check-out repo | ||
#---------------------------------------------- | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
#---------------------------------------------- | ||
# Launch checks and tests | ||
#---------------------------------------------- | ||
- name: Configure docker | ||
run: | | ||
# ensure a new line for .env file might not have it! | ||
echo "" >> .env | ||
# align user id | ||
echo "OFF_UID=$UID" >> .env | ||
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> .env | ||
- name: Launch tests | ||
run: make 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
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 |
---|---|---|
|
@@ -25,6 +25,7 @@ def override_get_db(): | |
db = session() | ||
yield db | ||
finally: | ||
# close the DB session | ||
db.close() | ||
|
||
|
||
|