Skip to content

Add more informative 401 error. #62

Add more informative 401 error.

Add more informative 401 error. #62

Workflow file for this run

name: Python CI actions
on:
push:
branches:
- main
pull_request:
env:
PGDATABASE: gateway
PGPASSWORD: password
PGUSER: user
PGHOST: localhost
PGPORT: 5432
SQLALCHEMY_DATABASE_URI: "postgresql://user:password@localhost:5432/gateway"
REDIS_SERVICE_URL: "redis://localhost:6379/0"
LIMITER_SERVICE_STORAGE_URI: "redis://localhost:6379/0"
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.4
env:
POSTGRES_DB: gateway
POSTGRES_PASSWORD: password
POSTGRES_USER: user
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
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
redis:
image: redis
env:
REDIS_HOST: localhost
REDIS_PORT: 6379
ports:
- 6379:6379
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install setuptools==57.5.0 wheel psycopg2
pip install .
pip install -e '.[dev]'
- name: Initialize postgres
run: |
alembic upgrade head
- name: Test with pytest
run: |
pytest
- name: Coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}