mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 03:14:06 -05:00
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Python Unit Tests
|
|
concurrency:
|
|
group: Python-Unit-Tests-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
merge_group:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'release/**'
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
backend-check:
|
|
# See https://runs-on.com/runners/linux/
|
|
runs-on: [runs-on, runner=2cpu-linux-arm64, "run-id=${{ github.run_id }}-backend-check"]
|
|
timeout-minutes: 45
|
|
|
|
|
|
env:
|
|
PYTHONPATH: ./backend
|
|
REDIS_CLOUD_PYTEST_PASSWORD: ${{ secrets.REDIS_CLOUD_PYTEST_PASSWORD }}
|
|
DISABLE_TELEMETRY: "true"
|
|
|
|
steps:
|
|
- uses: runs-on/action@cd2b598b0515d39d78c38a02d529db87d2196d1e # ratchet:runs-on/action@v2
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # ratchet:actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Python and Install Dependencies
|
|
uses: ./.github/actions/setup-python-and-install-dependencies
|
|
with:
|
|
requirements: |
|
|
backend/requirements/default.txt
|
|
backend/requirements/dev.txt
|
|
backend/requirements/model_server.txt
|
|
backend/requirements/ee.txt
|
|
|
|
- name: Run Tests
|
|
shell: script -q -e -c "bash --noprofile --norc -eo pipefail {0}"
|
|
run: py.test -o junit_family=xunit2 -xv --ff backend/tests/unit
|