Skip to content

Commit

Permalink
Create unit_tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham authored Sep 2, 2023
1 parent 8c3644a commit 6d6e150
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/unit_tests.yml
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

0 comments on commit 6d6e150

Please sign in to comment.