Add push listener #79
Workflow file for this run
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
name: BDD Tests | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
- '.vscode/**' | |
- '**.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
- '.vscode/**' | |
- '**.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: rofrano/pipeline-selenium:latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: pgs3cr3t | |
POSTGRES_DB: testdb | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install OS dependencies | |
run: | | |
apt-get update | |
apt-get install -y gcc libpq-dev | |
- name: Install Python packages | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -r requirements.txt | |
- name: Run the service locally | |
run: | | |
echo "\n*** STARTING APPLICATION ***\n" | |
gunicorn --log-level=critical --bind=0.0.0.0:8000 service:app & | |
sleep 5 | |
curl -i http://localhost:8000/health | |
echo "\n*** SERVER IS RUNNING ***" | |
env: | |
DATABASE_URI: "postgresql://postgres:pgs3cr3t@postgres:5432/testdb" | |
- name: Run Integration Tests | |
run: behave | |