File tree Expand file tree Collapse file tree 11 files changed +93
-40
lines changed
Expand file tree Collapse file tree 11 files changed +93
-40
lines changed Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ workflow_dispatch :
9+
10+ env :
11+ PYTHON_VERSION : " 3.14"
12+
13+ jobs :
14+ lint :
15+ name : Lint
16+ runs-on : ubuntu-latest
17+ timeout-minutes : 5
18+ permissions :
19+ contents : read
20+ steps :
21+ - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
22+ with :
23+ persist-credentials : false
24+ - name : Set up Python ${{ env.PYTHON_VERSION }}
25+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
26+ with :
27+ python-version : ${{ env.PYTHON_VERSION }}
28+ - name : Run lint verification
29+ run : ./scripts/lint.sh
Original file line number Diff line number Diff line change 1- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
21name : Test
32
43on :
1110 workflow_dispatch :
1211
1312jobs :
14- typecheck :
15- name : Typechecks
16- runs-on : ubuntu-latest
17- timeout-minutes : 5
18- strategy :
19- matrix :
20- python-version : ["3.14"]
21- permissions :
22- contents : read
23- steps :
24- - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
25- with :
26- persist-credentials : false
27- - name : Set up Python ${{ matrix.python-version }}
28- uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
29- with :
30- python-version : ${{ matrix.python-version }}
31- - name : Run mypy verification
32- run : |
33- ./scripts/run_mypy.sh
3413 unittest :
3514 name : Unit tests
3615 runs-on : ubuntu-22.04
4827 - " 3.8"
4928 - " 3.7"
5029 - " pypy3.10"
30+ - " pypy3.11"
5131 permissions :
5232 contents : read
5333 env :
6747 pip install -U pip
6848 pip install -r requirements/testing.txt
6949 pip install -r requirements/optional.txt
70- - name : Run validation (black/flake8/pytest)
50+ - name : Run tests
7151 run : |
72- black --check slack/ slack_sdk/ tests/ integration_tests/
73- flake8 slack/ slack_sdk/
7452 PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ --junitxml=reports/test_report.xml tests/
7553 - name : Run tests for SQLAlchemy v1.4 (backward-compatibility)
7654 run : |
10280 name : Regression notifications
10381 runs-on : ubuntu-latest
10482 needs :
105- - typecheck
10683 - unittest
10784 if : ${{ !success() && github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' }}
10885 steps :
Original file line number Diff line number Diff line change 1+ name : Typecheck
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ workflow_dispatch :
9+
10+ env :
11+ PYTHON_VERSION : " 3.14"
12+
13+ jobs :
14+ typecheck :
15+ name : Typecheck
16+ runs-on : ubuntu-latest
17+ timeout-minutes : 5
18+ permissions :
19+ contents : read
20+ steps :
21+ - uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
22+ with :
23+ persist-credentials : false
24+ - name : Set up Python ${{ env.PYTHON_VERSION }}
25+ uses : actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
26+ with :
27+ python-version : ${{ env.PYTHON_VERSION }}
28+ - name : Run mypy verification
29+ run : ./scripts/run_mypy.sh
Original file line number Diff line number Diff line change @@ -12,4 +12,3 @@ moto>=4.0.13,<6
1212# For AsyncSQLAlchemy tests
1313greenlet<=4
1414aiosqlite<=1
15- -r tools.txt
Original file line number Diff line number Diff line change 1- # We only need to install mypy with CPython runtimes
2- # Typechecking using the PyPy runtime is not planned
3- mypy<=1.19.0; platform_python_implementation == "CPython"
1+ mypy<=1.19.0;
42# while flake8 5.x have issues with Python 3.12, flake8 6.x requires Python >= 3.8.1,
53# so 5.x should be kept in order to stay compatible with Python 3.7/3.8
64flake8>=5.0.4,<8
Original file line number Diff line number Diff line change 44script_dir=` dirname $0 `
55cd ${script_dir} /..
66
7- pip install -U pip
8- pip install -U -r requirements/tools.txt
7+ if [[ " $1 " != " --no-install" ]]; then
8+ pip install -U pip
9+ pip install -U -r requirements/tools.txt
10+ fi
911
1012black slack/ slack_sdk/ tests/ integration_tests/
Original file line number Diff line number Diff line change 1+
2+ #! /bin/bash
3+ # ./scripts/lint.sh
4+
5+ script_dir=` dirname $0 `
6+ cd ${script_dir} /..
7+
8+ if [[ " $1 " != " --no-install" ]]; then
9+ pip install -U pip
10+ pip install -U -r requirements/tools.txt
11+ fi
12+
13+ black --check slack/ slack_sdk/ tests/ integration_tests/
14+ flake8 slack/ slack_sdk/
Original file line number Diff line number Diff line change @@ -10,10 +10,11 @@ cd ${script_dir}/..
1010
1111pip install -U pip
1212pip install -U -r requirements/testing.txt \
13- -U -r requirements/optional.txt
13+ -U -r requirements/optional.txt \
14+ -U -r requirements/tools.txt
1415
1516echo " Generating code ..." && python scripts/codegen.py --path .
16- echo " Running black (code formatter) ..." && black slack_sdk/
17+ echo " Running black (code formatter) ..." && ./scripts/format.sh --no-install
1718
1819test_target=" ${1:- tests/ integration_tests/ } "
1920PYTHONPATH=$PWD :$PYTHONPATH pytest $test_target
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ cd ${script_dir}/..
88
99pip install -U pip setuptools wheel
1010pip install -U -r requirements/testing.txt \
11- -U -r requirements/optional.txt
11+ -U -r requirements/optional.txt \
12+ -U -r requirements/tools.txt
1213
1314mypy --config-file pyproject.toml
Original file line number Diff line number Diff line change @@ -10,10 +10,12 @@ cd ${script_dir}/..
1010
1111pip install -U pip
1212pip install -U -r requirements/testing.txt \
13- -U -r requirements/optional.txt
13+ -U -r requirements/optional.txt \
14+ -U -r requirements/tools.txt
1415
1516echo " Generating code ..." && python scripts/codegen.py --path .
16- echo " Running black (code formatter) ..." && black slack_sdk/
17+ echo " Running black (code formatter) ..." && ./scripts/format.sh --no-install
1718
19+ echo " Running tests ..."
1820test_target=" ${1:- tests/ } "
1921PYTHONPATH=$PWD :$PYTHONPATH pytest $test_target
You can’t perform that action at this time.
0 commit comments