mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 19:32:55 -05:00
* add pip retries to the github workflows too * let's try running on amd64 ... docker builds are unusually flaky * bump * try large * no yaml anchors * switch back down to Amd64 --------- Co-authored-by: Richard Kuo <rkuo@rkuo.com>
38 lines
982 B
YAML
38 lines
982 B
YAML
name: Python Unit Tests
|
|
|
|
on:
|
|
merge_group:
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
backend-check:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
PYTHONPATH: ./backend
|
|
REDIS_CLOUD_PYTEST_PASSWORD: ${{ secrets.REDIS_CLOUD_PYTEST_PASSWORD }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
cache-dependency-path: |
|
|
backend/requirements/default.txt
|
|
backend/requirements/dev.txt
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --retries 5 --timeout 30 -r backend/requirements/default.txt
|
|
pip install --retries 5 --timeout 30 -r backend/requirements/dev.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
|