Skip to content

Commit

Permalink
Add tests to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
FinemechanicPub committed Aug 10, 2024
1 parent 6fef408 commit 17258db
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,31 @@ env:
REGISTRY: ghcr.io
BACKEND_IMAGE_NAME: ${{ github.repository }}-backend

jobs:
jobs:
run-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r test-requirements.txt
- name: Test with pytest
run: pytest
build-backend:
runs-on: ubuntu-latest
needs:
- run-tests
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
# GITHUB_TOKEN автоматически создается GitHub перед началом выполнения скрипта
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
Expand Down

0 comments on commit 17258db

Please sign in to comment.