mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 16:01:15 -05:00
Run tests on CI push, gate deploy on them
This commit is contained in:
90
.github/workflows/checks.yml
vendored
90
.github/workflows/checks.yml
vendored
@@ -1,50 +1,50 @@
|
|||||||
# name: Run checks
|
name: Run checks
|
||||||
|
|
||||||
# on: [push]
|
on: [push]
|
||||||
|
|
||||||
# permissions:
|
permissions:
|
||||||
# contents: read
|
contents: read
|
||||||
|
|
||||||
# jobs:
|
jobs:
|
||||||
# build:
|
build:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# services:
|
services:
|
||||||
# postgres:
|
postgres:
|
||||||
# image: postgres
|
image: postgres
|
||||||
# env:
|
env:
|
||||||
# POSTGRES_USER: user
|
POSTGRES_USER: user
|
||||||
# POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
# POSTGRES_DB: test_notification_api
|
POSTGRES_DB: test_notification_api
|
||||||
# options: >-
|
options: >-
|
||||||
# --health-cmd pg_isready
|
--health-cmd pg_isready
|
||||||
# --health-interval 10s
|
--health-interval 10s
|
||||||
# --health-timeout 5s
|
--health-timeout 5s
|
||||||
# --health-retries 5
|
--health-retries 5
|
||||||
# ports:
|
ports:
|
||||||
# # Maps tcp port 5432 on service container to the host
|
# Maps tcp port 5432 on service container to the host
|
||||||
# - 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
# steps:
|
steps:
|
||||||
# - name: Install container dependencies
|
- name: Install container dependencies
|
||||||
# run: |
|
run: |
|
||||||
# sudo apt-get update \
|
sudo apt-get update \
|
||||||
# && sudo apt-get install -y --no-install-recommends \
|
&& sudo apt-get install -y --no-install-recommends \
|
||||||
# libcurl4-openssl-dev
|
libcurl4-openssl-dev
|
||||||
# - uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
# - name: Set up Python 3.9
|
- name: Set up Python 3.9
|
||||||
# uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
# with:
|
with:
|
||||||
# python-version: "3.9"
|
python-version: "3.9"
|
||||||
# - name: Install application dependencies
|
- name: Install application dependencies
|
||||||
# run: make bootstrap
|
run: make bootstrap
|
||||||
# env:
|
env:
|
||||||
# SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
|
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
|
||||||
# # - name: Run style checks
|
# - name: Run style checks
|
||||||
# # run: flake8 .
|
# run: flake8 .
|
||||||
# # - name: Check imports alphabetized
|
# - name: Check imports alphabetized
|
||||||
# # run: isort --check-only ./app ./tests
|
# run: isort --check-only ./app ./tests
|
||||||
# - name: Run tests
|
- name: Run tests
|
||||||
# run: pytest -n4 --maxfail=10
|
run: pytest -n4 --maxfail=10
|
||||||
# env:
|
env:
|
||||||
# SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
|
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
|
||||||
|
|||||||
10
.github/workflows/deploy.yml
vendored
10
.github/workflows/deploy.yml
vendored
@@ -1,10 +1,10 @@
|
|||||||
name: Deploy to prototype environment
|
name: Deploy to prototype environment
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
# workflow_run:
|
workflow_run:
|
||||||
# workflows: [ Run checks ]
|
workflows: [ Run checks ]
|
||||||
# types:
|
types:
|
||||||
# - completed
|
- completed
|
||||||
# branches: [ main ]
|
# branches: [ main ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
Reference in New Issue
Block a user