Merge pull request #73 from GPTStonks/enh/reorganize-deps #172
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main, "release/*", "dev"] | |
jobs: | |
run_tests_ubuntu: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10"] | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install pdm | |
pdm install --no-editable --no-self -G :all | |
- name: Run pytest | |
run: | | |
.venv/bin/pytest -v | |
run_tests_windows: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["windows-latest"] | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install pdm | |
pdm install --no-editable --no-self -G :all | |
- name: Run pytest | |
run: | | |
.\.venv\Scripts\pytest | |
# upload code coverage report | |
code-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install pdm | |
pdm install --no-editable --no-self -G :all | |
- name: Run tests and collect coverage | |
run: .venv/bin/pytest --cov openbb_chat | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |