ci: weekly check. #819
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: pytest | |
on: push | |
jobs: | |
pytest: | |
name: runner / pytest tests | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
extras: | |
- . | |
- .[speedup] | |
- .[voice] | |
- .[all] | |
python-version: | |
- "3.10" | |
- "3.11" | |
include: | |
- extras: .[all] | |
python-version: "3.10" | |
RUN_TESTBOT: true | |
- extras: .[all] | |
python-version: "3.11" | |
RUN_TESTBOT: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install ffmpeg & opus | |
run: sudo apt-get update && sudo apt-get install ffmpeg libopus-dev | |
- name: Install pytest | |
run: | | |
pip install wheel | |
pip install -e ${{ matrix.extras }} | |
pip install .[tests] | |
- name: Run Tests | |
env: | |
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
RUN_TESTBOT: ${{ matrix.RUN_TESTBOT }} | |
run: | | |
pytest --cov=./ --cov-report xml:coverage.xml | |
coverage xml -i | |
- name: Upload Coverage | |
run: | | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
chmod +x codecov | |
./codecov | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() # always run even if the previous step fails | |
with: | |
report_paths: '**/TestResults.xml' | |
check_name: 'Pytest Results' |