Skip to content

build: Upgrade to Pydantic v2 using TypeAdapters (#24) #16

build: Upgrade to Pydantic v2 using TypeAdapters (#24)

build: Upgrade to Pydantic v2 using TypeAdapters (#24) #16

Workflow file for this run

# Runs coverage tests. Will stage a comment to be posted with coverage result as PR comment
# On push to main uploads result files (e.g. badge) to orphan branch "python-coverage-mds-toolkit-data"
name: Build
on:
pull_request:
push:
branches: ['main']
jobs:
test:
name: Run tests & display coverage
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
pip install poetry
pip install setuptools
poetry install
- name: Test with coverage
run: poetry run coverage run -m pytest atmos_validation
- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90
- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v3
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt