Add, configure and run pre-commit locally and in test workflow

This commit is contained in:
Debanjum Singh Solanky
2023-02-17 12:07:59 -06:00
parent 5e83baab21
commit 051f0e3fb5
22 changed files with 183 additions and 162 deletions

View File

@@ -44,4 +44,4 @@ jobs:
push: true
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}
build-args: |
PORT=8000
PORT=8000

View File

@@ -78,4 +78,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
password: ${{ secrets.PYPI_API_KEY }}
repository_url: https://test.pypi.org/legacy/
repository_url: https://test.pypi.org/legacy/

View File

@@ -9,6 +9,7 @@ on:
- tests/**
- config/**
- pyproject.toml
- .pre-commit-config.yml
- .github/workflows/test.yml
push:
branches:
@@ -18,6 +19,7 @@ on:
- tests/**
- config/**
- pyproject.toml
- .pre-commit-config.yml
- .github/workflows/test.yml
jobs:
@@ -45,9 +47,10 @@ jobs:
python -m pip install --upgrade pip
- name: Install Application
run: |
pip install --upgrade .[dev]
run: pip install --upgrade .[dev]
- name: Validate Application
run: pre-commit
- name: Test Application
run: |
pytest
run: pytest