Skip to content

find static fields from dataclass parents (#14) #50

find static fields from dataclass parents (#14)

find static fields from dataclass parents (#14) #50

Workflow file for this run

# Checks that we can build and validate the Unittest
name: Run Tests
on:
push:
branches:
- main
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Check out the code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/[email protected]
with:
version: 1.4.0
- name: Setup Poetry
run: |
poetry config virtualenvs.in-project true
- name: Cache
id: cache
uses: actions/[email protected]
with:
path: '.venv'
key: run-tests-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
if [ -d ".venv" ]; then rm -rf .venv; fi
poetry run pip install -U certifi
poetry install
- name: Install Package
run: |
poetry install
- name: Run Tests
run: poetry run pytest --cov=simple_pytree --cov-report=term-missing --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3
test-import:
name: Test Import without Dev Dependencies
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Check out the code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/[email protected]
with:
version: 1.4.0
- name: Setup Poetry
run: |
poetry config virtualenvs.in-project true
- name: Cache
id: cache
uses: actions/[email protected]
with:
path: '.venv'
key: test-import-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
poetry run pip install -U certifi
poetry install --only main
- name: Install Package
run: |
poetry install --only main
- name: Test Import
run: |
poetry run python -c "import simple_pytree"