migrate to poetry #23
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: ci_cd_checks | |
on: | |
pull_request: | |
branches: "*" | |
push: | |
branches: "*" | |
jobs: | |
ruff: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-python-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
**.py | |
- name: Setup Python environment | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Installs | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
run: | | |
python -m pip install ruff | |
- name: Ruff | |
if: steps.changed-python-files.outputs.any_changed == 'true' | |
run: | | |
ruff check --output-format=github . | |
unit_tests: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python environment | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Run Unit Tests | |
run: | | |
pip install --upgrade pip cmake | |
pip install -r requirements.txt | |
pip install pytest | |
pytest -rf tests/* |