Upgrade #208
This file contains hidden or 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: Tests | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v2 | |
- name: Install pipenv | |
run: pipx install pipenv | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
cache: 'pipenv' | |
- id: pipenv-install | |
name: Install Python dependencies | |
run: pipenv install --dev --python `which python` | |
- name: Lint | |
run: pipenv run flake8 calaccess_website --exclude=calaccess_website/migrations/* | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v2 | |
- uses: harmon758/postgresql-action@v1 | |
with: | |
postgresql version: '11' | |
postgresql db: calaccess_website | |
postgresql user: postgres | |
postgresql password: postgres | |
- name: Install pipenv | |
run: pipx install pipenv | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
cache: 'pipenv' | |
- id: pipenv-install | |
name: Install Python dependencies | |
run: pipenv install --dev --python `which python` | |
- name: Test | |
run: pipenv run python manage.py test calaccess_website | |
env: | |
PGPASSWORD: postgres |