Skip to content

Commit

Permalink
ci: added a github action to run checks against backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ravij3 committed Feb 10, 2023
1 parent c95bafe commit f5e50ba
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ci-checks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2

- name: Setup Python Version
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry Action
working-directory: backend
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true

- name: run checks
working-directory: backend
run: make all
10 changes: 5 additions & 5 deletions backend/makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

lint:
flake8
poetry run flake8

typecheck:
mypy .
poetry run mypy .

coverage:
coverage run -m pytest
coverage report
poetry run coverage run -m pytest
poetry run coverage report

install:
poetry install

all: install lint typecheck coverage
all: install lint typecheck coverage

0 comments on commit f5e50ba

Please sign in to comment.