feat: wip #651
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
# 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', 'pypy-3.9'] | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@main | |
with: | |
cache: pip | |
python-version: ${{ matrix.python-version }} | |
- name: Setup requirements | |
run: pip install .[tests] | |
- name: Check code | |
run: ruff check asgi_tools | |
- name: Check types | |
run: mypy | |
if: ${{ matrix.python-version != 'pypy-3.9' }} | |
- name: Run tests | |
run: pytest | |
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:" |