Skip to content

Commit

Permalink
Add correct GithubActions (#9)
Browse files Browse the repository at this point in the history
* update(.github/tests): add github actions, delete unit tests dir from tests

* update(.github): change configure command

* update(pre-commit): delete test hook

---------

Co-authored-by: danila <[email protected]>
  • Loading branch information
HighlyLoadedEgo and danila authored Feb 3, 2024
1 parent b9efb00 commit c186b1c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 41 deletions.
30 changes: 0 additions & 30 deletions .github/worflows/run_tests.yaml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Run tests

on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: "poetry"
cache-dependency-path: poetry.lock
- name: Install dependencies
run: poetry install
lint:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: "poetry"
cache-dependency-path: poetry.lock
- name: Lint with pre-commit
run: poetry run pre-commit run --all-files
# TODO: configure working with config and keys for jwt
# test:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install poetry
# run: pipx install poetry
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.12"
# cache: "poetry"
# cache-dependency-path: poetry.lock
# - name: Test with pytest
# run: poetry run pytest
11 changes: 0 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,3 @@ repos:
rev: v1.16.23
hooks:
- id: typos

# Pytest
- repo: local
hooks:
- id: pytest
name: pytest
language: system
entry: pytest -n 4
pass_filenames: false
always_run: true
stages: [ commit ]

0 comments on commit c186b1c

Please sign in to comment.