Update ci.yml #22
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: CI | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- requirements.txt # ignore pushes that only change requirements.txt | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pytest pytest-cov | |
- name: List installed packages | |
run: | | |
pip list | |
- name: Run tests with coverage | |
run: | | |
pytest --cov=src/yawt tests/ --cov-report=xml | |
- name: Upload coverage to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |