-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (44 loc) · 1.52 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: tests
on:
pull_request:
branches: [master, develop]
push:
branches: [master, develop]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@main
- name: install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@main
with:
cache: poetry
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: poetry install --with dev
- name: Check code
run: poetry run ruff check muffin_admin
- name: Check typing
run: poetry run mypy
- name: Test with pytest
run: poetry run pytest tests
notify:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Notify Success
uses: archive/github-actions-slack@master
with:
slack-channel: C2CRL4C4V
slack-text: "*[${{ github.repository }}]* tests are passed *(${{ github.ref }})* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-optional-as_user: false
slack-optional-icon_emoji: ":white_check_mark:"