-
Notifications
You must be signed in to change notification settings - Fork 1.6k
64 lines (57 loc) · 1.77 KB
/
Copy pathpython_backend_tests.yml
File metadata and controls
64 lines (57 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "Python Backend Tests"
run-name: "Python Backend Tests on ${{ github.ref_name }} by @${{ github.actor }}"
permissions:
contents: read
checks: write
pull-requests: write
on:
pull_request:
paths:
- "apps/opik-python-backend/**"
- ".github/workflows/python_backend_tests.yml"
push:
branches:
- 'main'
paths:
- "apps/opik-python-backend/**"
- ".github/workflows/python_backend_tests.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
run-python-backend-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: apps/opik-python-backend/
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r tests/test_requirements.txt
pip install .
- name: Run unit tests
env:
PYTHON_CODE_EXECUTOR_STRATEGY: process
PYTHON_CODE_EXECUTOR_EXEC_TIMEOUT_IN_SECS: 10
run: |
cd tests && pytest unit -v --durations=0 --junitxml=../test-results.xml
- name: Publish Test Report
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always()
with:
action_fail: true
comment_mode: failures
check_name: Python Backend Tests Results
files: apps/opik-python-backend/test-results.xml