Make CI fail if code isn't formatted properly #157
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: continuous integration | |
on: [push, pull_request] | |
# These keys should match the keys in .env.template | |
env: | |
AFFILS_DB_NAME: "affils.db" | |
AFFILS_DB_FILE: "${{ github.workspace }}/affils.db" | |
AFFILS_FLASK_SECRET_KEY: "gottaPutSomethingHereSoGitHubActionsWorks" | |
AFFILS_AWS_REGION: "us-west-2" | |
permissions: | |
contents: read | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: install Pipenv | |
run: pip install pipenv --user | |
- name: install dependencies | |
run: pipenv sync --dev # Installs all deps, including dev deps, from Pipfile.lock. | |
- name: seed the database | |
run: pipenv run invoke dbseed | |
- name: format | |
run: pipenv run invoke fmtcheck | |
- name: lint | |
run: pipenv run invoke lint | |
- name: check types | |
run: pipenv run invoke types | |
- name: run tests | |
run: pipenv run invoke test |