[feat] restructure module with poetry build tool #2
Workflow file for this run
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: | |
pull_request: | |
push: | |
branches: [ main ] | |
jobs: | |
tests: | |
name: Unittest | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ windows-latest, ubuntu-latest ] | |
python: [ '3.10.x' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'pip' | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Setup poetry cache | |
uses: actions/cache@v3 | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --no-root --with dev | |
- name: Run tests | |
run: poetry run pytest --cov=finq --cov-report=xml tests | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |