Skip to content

Automated Latest Dependency Updates #591

Automated Latest Dependency Updates

Automated Latest Dependency Updates #591

on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
name: Unit Tests - Latest Dependencies
jobs:
unit_tests:
name: Unit Tests / Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Build source distribution
run: make package
- name: Install package with test requirements
run: |
python -m pip config --site set global.progress_bar off
python -m pip install --upgrade pip
python -m pip install unpacked_sdist/[test]
- if: ${{ matrix.python-version == 3.8 }}
name: Run unit tests with code coverage
run: |
coverage erase
cd unpacked_sdist/
pytest composeml/ -n auto --cov=composeml --cov-config=../pyproject.toml --cov-report=xml:../coverage.xml
- if: ${{ matrix.python-version != 3.8 }}
name: Run unit tests with no code coverage
run: |
cd unpacked_sdist/
pytest composeml/ -n auto
- if: ${{ matrix.python-version == 3.8 }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ${{ github.workspace }}/coverage.xml
verbose: true