diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml new file mode 100644 index 00000000..91a5836c --- /dev/null +++ b/.github/workflows/build_and_test.yaml @@ -0,0 +1,35 @@ +name: Build and Test Busy Beaver +on: [pull_request] +jobs: + build-and-test-app: + runs-on: ubuntu-latest + services: + db: + image: postgres:10.3-alpine + env: + POSTGRES_DB: busy-beaver + POSTGRES_USER: bbdev_user + POSTGRES_PASSWORD: bbdev_password + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + redis: + image: redis:4.0-alpine + + container: python:3.8.1-buster + env: + PYTHONPATH: . + FLASK_APP: /app/busy_beaver/__init__.py + FLASK_ENV: development + DATABASE_URI: postgresql://bbdev_user:bbdev_password@db:5432/busy-beaver + REDIS_URI: redis://redis:6379 + OAUTHLIB_INSECURE_TRANSPORT: 1 + OAUTHLIB_RELAX_TOKEN_SCOPE: 1 + steps: + - uses: actions/checkout@v2 + - name: Build the stack + run: make up + - name: Test application + run: make test