Add rapidpro group count monitor #57
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: Run tests | |
on: [pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:9.6 | |
env: | |
POSTGRES_DB: rp_sidekick | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
env: | |
RP_SIDEKICK_DATABASE: postgres://postgres:postgres@localhost/rp_sidekick | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install gettext | |
run: sudo apt-get install gettext | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}-pip | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependancies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt -r requirements-dev.txt | |
- name: Lint | |
run: | | |
flake8 | |
python manage.py makemigrations rp_dtone rp_transferto rp_recruit\ | |
sidekick --dry-run | grep 'No changes detected' || (echo 'There are\ | |
changes which require migrations.' && exit 1) | |
black --check . | |
isort -c -rc . | |
- name: Test | |
run: | | |
py.test |