-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
1 parent
8c3644a
commit 6d6e150
Showing
1 changed file
with
46 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,46 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
container-job: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- name: Check out repository code | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python3 | ||
uses: actions/setup-python@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip tox | ||
pip install -r requirements.txt | ||
- name: Run tests | ||
run: | | ||
tox -e py | ||
env: | ||
POSTGRES_HOST: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_PORT: 5432 | ||
POSTGRES_DB: nodejsscan | ||
SQLALCHEMY_DATABASE_URI: postgresql://postgres:postgres@localhost/nodejsscan |