Add app authority label verification. #129
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: Backend | |
on: | |
pull_request: | |
paths: | |
- "nwc_backend/**" | |
- ".github/workflows/backend.yaml" | |
merge_group: | |
paths: | |
- "nwc_backend/**" | |
- ".github/workflows/backend.yaml" | |
push: | |
branches: | |
- main | |
paths: | |
- "nwc_backend/**" | |
- ".github/workflows/backend.yaml" | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: "Setup Python" | |
uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.11" | |
cache: "pipenv" | |
cache-dependency-path: "Pipfile.lock" | |
- name: "Install pipenv" | |
run: "pip install pipenv wheel" | |
- name: "Install dependencies" | |
run: "pipenv install --dev" | |
- name: "Run pyre" | |
run: | | |
set -o pipefail | |
pipenv run pyre | tee >(sed 's, ,:,' | awk -F: '{sub(" ", "", $5); print "::error file=" ENVIRON["PWD"] "/" $1 ",line=" $2 ",col=" $3 ",title=" $4 "::" $5}') | |
- name: "Run ruff" | |
run: "pipenv run ruff check --output-format github ." | |
- name: "Run black" | |
run: | | |
set -o pipefail | |
pipenv run black --check --diff . | |
- name: Run tests | |
run: | | |
PYTHONPATH=. pipenv run pytest |