add PyPI badge #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ main, dev ] | |
schedule: | |
- cron: '0 0 * * *' # Runs at midnight UTC daily | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: '3.9' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Test and generate coverage report | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
pytest --cov=./ --cov-report=xml | |
# Optional: Upload coverage to Codecov if desired | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v2 | |
# with: | |
# file: ./coverage.xml | |
# fail_ci_if_error: true | |
- name: Notify on failure | |
if: failure() # This step will only run if any previous step fails | |
run: | | |
echo "Build or tests failed. Please check the logs." |