Bump codecov/codecov-action from 4 to 5 #50
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: Run Tests | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
jobs: | |
run: | |
runs-on: ubuntu-20.04 | |
strategy: | |
max-parallel: 1 | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Requirements | |
run: | | |
python -c "import sys; print(sys.version)" | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
python setup.py install | |
- name: Run Tests | |
env: | |
TMDB_APIKEY: ${{ secrets.TMDB_APIKEY }} | |
TMDB_SESSION: ${{ secrets.TMDB_SESSION }} | |
TMDB_V4_ACCESS: ${{ secrets.TMDB_V4_ACCESS }} | |
TMDB_V4_TOKEN: ${{ secrets.TMDB_V4_TOKEN }} | |
TMDB_USERNAME: ${{ secrets.TMDB_USERNAME }} | |
TMDB_PASSWORD: ${{ secrets.TMDB_PASSWORD }} | |
PAT: ${{ secrets.PAT }} | |
LOCAL: False | |
run: coverage run -m pytest -s --cov tmdbapis --cov-report xml tests/test* | |
- name: Codecov coverage reports | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
failure-notification: | |
runs-on: ubuntu-latest | |
if: ${{ failure() }} | |
needs: [run] | |
steps: | |
- name: Discord Failure Notification | |
uses: Kometa-Team/discord-notifications@master | |
with: | |
webhook_id_token: ${{ secrets.BUILD_WEBHOOK }} | |
message: <@&1079153184007790652> | |
title: "${{ secrets.REPO_NAME }}: **Tests Failed**" | |
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }} | |
color: 14879811 | |
username: Kobota | |
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png | |
author: GitHub | |
author_icon_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/git.png |