chore(release): version 3.40.1 #1731
Workflow file for this run
This file contains hidden or 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: Python CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| env: | |
| LATEST_SUPPORTED_PY: "3.14" | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ env.LATEST_SUPPORTED_PY }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ env.LATEST_SUPPORTED_PY }} | |
| - name: Run lint verification | |
| run: ./scripts/lint.sh | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ env.LATEST_SUPPORTED_PY }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ env.LATEST_SUPPORTED_PY }} | |
| - name: Run mypy verification | |
| run: ./scripts/run_mypy.sh | |
| unittest: | |
| name: Unit tests | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.14" | |
| - "3.13" | |
| - "3.12" | |
| - "3.11" | |
| - "3.10" | |
| - "3.9" | |
| - "3.8" | |
| - "3.7" | |
| - "pypy3.10" | |
| - "pypy3.11" | |
| permissions: | |
| contents: read | |
| env: | |
| CI_LARGE_SOCKET_MODE_PAYLOAD_TESTING_DISABLED: "1" | |
| FORCE_COLOR: "1" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| pip install -U pip | |
| pip install -r requirements/testing.txt | |
| pip install -r requirements/optional.txt | |
| - name: Run tests | |
| run: | | |
| PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ --junitxml=reports/test_report.xml tests/ | |
| - name: Run tests for SQLAlchemy v1.4 (backward-compatibility) | |
| run: | | |
| # Install v1.4 for testing | |
| pip install "SQLAlchemy>=1.4,<2" | |
| PYTHONPATH=$PWD:$PYTHONPATH pytest tests/slack_sdk/oauth/installation_store/test_sqlalchemy.py | |
| PYTHONPATH=$PWD:$PYTHONPATH pytest tests/slack_sdk/oauth/state_store/test_sqlalchemy.py | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| directory: ./reports/ | |
| fail_ci_if_error: true | |
| flags: ${{ matrix.python-version }} | |
| report_type: test_results | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| - name: Upload test coverage to Codecov (only with latest supported version) | |
| if: startsWith(matrix.python-version, env.LATEST_SUPPORTED_PY) | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| fail_ci_if_error: true | |
| # Run validation generates the coverage file | |
| files: ./coverage.xml | |
| report_type: coverage | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| databases: | |
| # TODO: Add MySQL and other database testing when possible | |
| name: Database Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| services: | |
| postgres: | |
| image: postgres@sha256:e4842c8a99ca99339e1693e6fe5fe62c7becb31991f066f989047dfb2fbf47af # 16 | |
| env: | |
| POSTGRES_USER: test_user | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ env.LATEST_SUPPORTED_PY }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ env.LATEST_SUPPORTED_PY }} | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| pip install -U pip | |
| pip install -r requirements/testing.txt | |
| pip install -r requirements/optional.txt | |
| pip install -r requirements/databases.txt | |
| - name: Run sync tests (PostgreSQL) | |
| env: | |
| TEST_DATABASE_URL: postgresql://test_user:password@localhost/test | |
| run: | | |
| PYTHONPATH=$PWD:$PYTHONPATH pytest -s tests/slack_sdk/oauth/installation_store/test_sqlalchemy.py | |
| PYTHONPATH=$PWD:$PYTHONPATH pytest -s tests/slack_sdk/oauth/state_store/test_sqlalchemy.py | |
| - name: Run async tests (PostgreSQL) | |
| env: | |
| ASYNC_TEST_DATABASE_URL: postgresql+asyncpg://test_user:password@localhost/test | |
| run: | | |
| PYTHONPATH=$PWD:$PYTHONPATH pytest -s tests/slack_sdk/oauth/installation_store/test_async_sqlalchemy.py | |
| PYTHONPATH=$PWD:$PYTHONPATH pytest -s tests/slack_sdk/oauth/state_store/test_async_sqlalchemy.py | |
| notifications: | |
| name: Regression notifications | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| - typecheck | |
| - unittest | |
| - databases | |
| if: ${{ !success() && github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' }} | |
| steps: | |
| - name: Send notifications of failing tests | |
| uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 | |
| with: | |
| errors: true | |
| webhook: ${{ secrets.SLACK_REGRESSION_FAILURES_WEBHOOK_URL }} | |
| webhook-type: webhook-trigger | |
| payload: | | |
| action_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| repository: "${{ github.repository }}" |