Skip to content

Tests

Tests #1513

Workflow file for this run

name: "Tests"
on:
push:
paths:
- ".github/**/*"
- "owlmixin/*"
- "owlmixin/**/*"
- "tests/*"
- "tests/**/*"
- "poetry.lock"
- ".codeclimate.yml"
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Python ${{ matrix.python }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install
- run: make test
- uses: codecov/codecov-action@v3
if: matrix.python == 3.12 && matrix.os == 'ubuntu-latest' && success()
- name: "Discord notification (not success)"
uses: rjstone/discord-webhook-notify@v1
if: "! success()"
with:
description: "⚠ Owlmixin Tests failed!"
footer: "Python v${{ matrix.python }} on ${{ matrix.os }})"
severity: error
avatarUrl: https://www.suruga-ya.jp/database/pics_light/game/871005085.jpg
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
notify:
needs: test
runs-on: ubuntu-latest
steps:
- name: "Discord notification (success)"
uses: rjstone/discord-webhook-notify@v1
if: always()
with:
description: "✅ Owlmixin Tests passed!"
footer: "Python v3.8/3.9/3.10/3.11/3.12"
severity: info
avatarUrl: https://www.suruga-ya.jp/database/pics_light/game/871005085.jpg
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}