diff --git a/.github/worflows/run_tests.yaml b/.github/worflows/run_tests.yaml deleted file mode 100644 index eeeb00f..0000000 --- a/.github/worflows/run_tests.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Run tests - -on: - push: - branches: [ "main", "dev" ] - pull_request: - branches: [ "main", "dev" ] - -jobs: - run_tests: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.12"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install poetry - poetry install - - name: Test with pytest - run: | - pytest diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml new file mode 100644 index 0000000..977bd94 --- /dev/null +++ b/.github/workflows/run_tests.yaml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8fbd77c..7977cc3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 ]