Skip to content

Commit

Permalink
chore: adding ci-cd (pre-commit and test)
Browse files Browse the repository at this point in the history
  • Loading branch information
natilou committed Aug 29, 2023
1 parent b932343 commit 3718d40
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pre-commit-and-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# gamification_api
# gamification_api
1 change: 0 additions & 1 deletion repository_interface/global_results_respository.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@


class GlobalResultsRepository(Protocol):

def get():
...
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class GlobalResultsSQLAlchemy:
"""
This is a mock. Here we should make a query
"""

def get(self):
return {
"data": {
Expand Down

0 comments on commit 3718d40

Please sign in to comment.