Change coveralls badge in README.md #12
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: Docker Development CI | |
# Controls when the workflow will run | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
docker-ci: | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Build application image | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
push: false | |
load: true | |
tags: devday_website_app:latest_dev | |
file: app-dev.Dockerfile | |
- | |
name: Setup test database user | |
run: | | |
umask 077 | |
echo "localhost:5432:*:postgres:postgres" > ~/.pgpass | |
psql -h localhost -p 5432 -U postgres -d postgres -w -f docker/db/dev/init-user-db.sql | |
- | |
name: Run tests | |
run: >- | |
docker run --rm | |
-e DEVDAY_PG_DBNAME=devday | |
-e DEVDAY_PG_HOST=db | |
-e DEVDAY_PG_PORT=5432 | |
-e DEVDAY_PG_USER=devday | |
-e DJANGO_SETTINGS_MODULE=devday.settings | |
-e POSTGRESQL_PASSWORD=devday | |
-e SECRET_KEY=test_secret | |
-e CONFIRMATION_SALT=test_confirmation_salt | |
-e "ADMINS=Admin1 <[email protected]>, Admin2 <[email protected]>" | |
-e DEBUG=true | |
--network "${{ job.container.network }}" | |
--entrypoint "" | |
-v ${{ github.workspace }}/devday:/app | |
devday_website_app:latest_dev | |
coverage run --branch manage.py test -v 2 | |
- | |
name: Coveralls | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
base-path: devday |