mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
* remove python 3.9 support and code * black * more cli lint * more linting * more lint * fix for tests * docstring grammar police * add lock to to build function to avoid async import race conditions * grammar police * lots more linting * relock
49 lines
1.2 KiB
YAML
Vendored
49 lines
1.2 KiB
YAML
Vendored
name: 🖥️ Unit test CLI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
paths:
|
|
- 'cli/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
unit_tests:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
python_version:
|
|
["3.10", "3.11", "3.12", "3.13"]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Install Python ${{ matrix.python_version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
allow-prereleases: true
|
|
cache: "pip"
|
|
|
|
- name: Cache pip packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ matrix.python_version }}-${{ hashFiles('cli/poetry.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
|
|
- name: Run tests
|
|
run: |
|
|
pip install nox
|
|
nox -f .github/scripts/noxfile.py -s unit_test_cli --python ${{ matrix.python_version }}
|