1- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
2- name : Test
1+ name : Python CI
32
43on :
54 push :
109 - cron : " 0 0 * * *"
1110 workflow_dispatch :
1211
12+ env :
13+ LATEST_SUPPORTED_PY : " 3.14"
14+
1315jobs :
16+ lint :
17+ name : Lint
18+ runs-on : ubuntu-latest
19+ timeout-minutes : 5
20+ permissions :
21+ contents : read
22+ steps :
23+ - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
24+ with :
25+ persist-credentials : false
26+ - name : Set up Python ${{ env.LATEST_SUPPORTED_PY }}
27+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
28+ with :
29+ python-version : ${{ env.LATEST_SUPPORTED_PY }}
30+ - name : Run lint verification
31+ run : ./scripts/lint.sh
32+
1433 typecheck :
15- name : Typechecks
34+ name : Typecheck
1635 runs-on : ubuntu-latest
1736 timeout-minutes : 5
18- strategy :
19- matrix :
20- python-version : ["3.14"]
2137 permissions :
2238 contents : read
2339 steps :
2440 - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2541 with :
2642 persist-credentials : false
27- - name : Set up Python ${{ matrix.python-version }}
43+ - name : Set up Python ${{ env.LATEST_SUPPORTED_PY }}
2844 uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
2945 with :
30- python-version : ${{ matrix.python-version }}
46+ python-version : ${{ env.LATEST_SUPPORTED_PY }}
3147 - name : Run mypy verification
32- run : |
33- ./scripts/run_mypy.sh
48+ run : ./scripts/run_mypy.sh
49+
3450 unittest :
3551 name : Unit tests
3652 runs-on : ubuntu-22.04
4864 - " 3.8"
4965 - " 3.7"
5066 - " pypy3.10"
67+ - " pypy3.11"
5168 permissions :
5269 contents : read
5370 env :
6784 pip install -U pip
6885 pip install -r requirements/testing.txt
6986 pip install -r requirements/optional.txt
70- - name : Run validation (black/flake8/pytest)
87+ - name : Run tests
7188 run : |
72- black --check slack/ slack_sdk/ tests/ integration_tests/
73- flake8 slack/ slack_sdk/
7489 PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ --junitxml=reports/test_report.xml tests/
7590 - name : Run tests for SQLAlchemy v1.4 (backward-compatibility)
7691 run : |
89104 token : ${{ secrets.CODECOV_TOKEN }}
90105 verbose : true
91106 - name : Upload test coverage to Codecov (only with latest supported version)
92- if : startsWith(matrix.python-version, '3.14' )
107+ if : startsWith(matrix.python-version, env.LATEST_SUPPORTED_PY )
93108 uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
94109 with :
95110 fail_ci_if_error : true
@@ -98,10 +113,12 @@ jobs:
98113 report_type : coverage
99114 token : ${{ secrets.CODECOV_TOKEN }}
100115 verbose : true
116+
101117 notifications :
102118 name : Regression notifications
103119 runs-on : ubuntu-latest
104120 needs :
121+ - lint
105122 - typecheck
106123 - unittest
107124 if : ${{ !success() && github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' }}
0 commit comments