mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 11:22:49 -05:00
* refactor salesforce sqlite db access * more refactoring * refactor again * refactor again * rename object * add finalizer to ensure db connection is always closed * avoid unnecessarily nesting connections and commit regularly when possible * remove db usage from csv download * dead code * hide deprecation warning in ddtrace * remove unused param * local testing WIP * stuff for pytest-dotenv * autodetect filter types instead of assuming last modified always works (it doesn't) Move filtering responsibility up instead of making utility calls excessively stateful * fix how changed parent id's are yielded * remove slow part of test * clean up comments * small refactor * more refactor * add normalize test * checkpoint and comments * add helper function * fix gitignore * add gitignore * update pyproject * delta updates * remove comments * fix time import * fix set init * add salesforce env vars * cleanup * more cleanup * filtered item is unbound here * typo * fix suffix check * fix empty type query --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Python Unit Tests
|
|
|
|
on:
|
|
merge_group:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'release/**'
|
|
|
|
jobs:
|
|
backend-check:
|
|
# See https://runs-on.com/runners/linux/
|
|
runs-on: [runs-on,runner=8cpu-linux-x64,"run-id=${{ github.run_id }}"]
|
|
|
|
env:
|
|
PYTHONPATH: ./backend
|
|
REDIS_CLOUD_PYTEST_PASSWORD: ${{ secrets.REDIS_CLOUD_PYTEST_PASSWORD }}
|
|
SF_USERNAME: ${{ secrets.SF_USERNAME }}
|
|
SF_PASSWORD: ${{ secrets.SF_PASSWORD }}
|
|
SF_SECURITY_TOKEN: ${{ secrets.SF_SECURITY_TOKEN }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
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
|