mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-28 03:11:40 -05:00
Run tests in CI
This commit is contained in:
40
.github/workflows/checks.yml
vendored
Normal file
40
.github/workflows/checks.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Run checks
|
||||
|
||||
on: [push]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_DB: db
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- name: Install dependencies
|
||||
run: make bootstrap
|
||||
# - name: Run style checks
|
||||
# run: flake8 .
|
||||
# - name: Check imports alphabetized
|
||||
# run: isort --check-only ./app ./tests
|
||||
- name: Run tests
|
||||
run: pytest -n4 --maxfail=10
|
||||
env:
|
||||
SQLALCHEMY_DATABASE_TEST_URI: postgresql://postgres:password@db:5432/test_notification_api
|
||||
Reference in New Issue
Block a user