Skip to content

chore: adding ci-cd (pre-commit and test) #1

chore: adding ci-cd (pre-commit and test)

chore: adding ci-cd (pre-commit and test) #1

name: pre-commit and tests
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Run pre-commit
uses: pre-commit/[email protected]
tests:
needs: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev --system
- name: Run tests
run: |
pytest