This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
Bump pre-commit from 3.3.2 to 3.3.3 (#654) #1319
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: CI | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r dev_requirements.txt | |
- name: Lint | |
run: | | |
pre-commit run --all-files | |
- name: Check migrations | |
env: | |
DJANGO_SETTINGS_MODULE: "web.settings" | |
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/mariaquiteria" | |
run: python manage.py makemigrations --check | |
- name: Run Tests | |
env: | |
DJANGO_SETTINGS_MODULE: "web.settings" | |
DJANGO_CONFIGURATION: "Test" | |
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/mariaquiteria" | |
run: | | |
python manage.py collectstatic | |
pytest | |
services: | |
postgres: | |
image: library/postgres:11-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: mariaquiteria | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
rabbitmq: | |
image: rabbitmq | |
env: | |
RABBITMQ_DEFAULT_USER: guest | |
RABBITMQ_DEFAULT_PASS: guest | |
ports: | |
- 5672:5672 | |
deploy: | |
runs-on: ubuntu-20.04 | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Push to dokku | |
uses: dokku/github-action@v1.0.2 | |
with: | |
branch: main | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
git_remote_url: ${{ secrets.DOKKU_REMOTE_URL }} | |
ssh_host_key: ${{ secrets.SSH_HOST_KEY }} | |
needs: [build] |