Skip to content

Update GitHub Actions workflows to use self-hosted runners #9

Update GitHub Actions workflows to use self-hosted runners

Update GitHub Actions workflows to use self-hosted runners #9

Workflow file for this run

name: Python Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: self-hosted # This line specifies to use your self-hosted runner
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
continue-on-error: true
- name: Install test dependencies
run: |
pip install pytest pytest-cov
continue-on-error: true
- name: Run tests
run: |
pytest tests/ --cov=src/ --cov-report=xml
continue-on-error: true
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
- name: Check for test failures
run: |
if [ ${{ job.status }} == 'failure' ]; then
echo "Tests failed. Please check the logs for more information."
exit 1
fi