Skip to content

Merge pull request #69 from chenyangkang/development #175

Merge pull request #69 from chenyangkang/development

Merge pull request #69 from chenyangkang/development #175

Workflow file for this run

name: run-pytest
on:
pull_request:
push:
branches: [ main ]
jobs:
pytesting:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-xdist
pip install .
pip install xgboost>=1.7.6
pip install watermark>=2.3.1
- name: Run pytest
run: |
pytest -n auto --cov --no-cov-on-fail --cov-report=term-missing:skip-covered --cov-report xml:coverage.xml
timeout-minutes: 300 # Set the timeout to 1.5 hours for this step
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - uses: action-badges/[email protected]
# with:
# branch-name: badges
# - name: Make Coverage Badge
# uses: action-badges/[email protected]
# with:
# file-name: coverage.svg
# badge-branch: badges
# github-token: '${{ secrets.SECRET_TOKEN }}'
# coverage-file-name: ./coverage.xml