feat: support latest redis #78
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.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@main | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@main | |
with: | |
cache: poetry | |
python-version: "3.11" | |
- name: Setup dependencies | |
run: poetry install --with dev --extras redislite | |
- name: Lint the code | |
run: | | |
poetry run mypy | |
poetry run ruff muffin_redis | |
- name: Test with pytest | |
run: poetry run pytest tests.py | |
notify: | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- name: Notify Success | |
uses: archive/github-actions-slack@master | |
with: | |
slack-channel: C2CRL4C4V | |
slack-text: Tests are passed *[${{ github.repository }}] (${{ 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:" |