Skip to content

Commit

Permalink
add workflow for lint and unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana14 committed May 10, 2024
1 parent c53ed8f commit 754f937
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
services:

steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
# Need fetch-depth 0 for generating version based on tags/commits since tag
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Deps
run: make setup

- name: Lint
run: make lint

- name: Run tests
run: make test
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ test:
.PHONY: fmt
fmt: ## Format the source code using pre-commit hooks
pre-commit run --all-files


.PHONY: setup
setup: ## Install project dependencies from requirements-dev.txt
pip install -r requirements-dev.txt


.PHONY: lint
lint:
ruff check .
mypy audit_log

0 comments on commit 754f937

Please sign in to comment.