Skip to content

Commit 77db11f

Browse files
authored
Improve the CI build settings (#516)
1 parent d5de9f7 commit 77db11f

File tree

3 files changed

+60
-19
lines changed

3 files changed

+60
-19
lines changed

.github/workflows/codecov.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run codecov
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
strategy:
13+
matrix:
14+
python-version: ['3.9']
15+
env:
16+
# default: multiprocessing
17+
# threading is more stable on GitHub Actions
18+
BOLT_PYTHON_MOCK_SERVER_MODE: threading
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
python setup.py install
28+
pip install -U pip
29+
pip install -e ".[async]"
30+
pip install -e ".[adapter]"
31+
pip install -e ".[testing]"
32+
- name: Run all tests for codecov
33+
run: |
34+
pytest --cov=slack_bolt/ && bash <(curl -s https://codecov.io/bash)

.github/workflows/pytype.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Run pytype validation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 15
12+
strategy:
13+
matrix:
14+
python-version: ['3.8']
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Run pytype verification
22+
run: |
23+
./scripts/run_pytype.sh

.github/workflows/ci-build.yml renamed to .github/workflows/tests.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
2-
name: CI Build
1+
name: Run all the unit tests
32

43
on:
54
push:
65
branches: [ main ]
76
pull_request:
8-
branches: [ main ]
97

108
jobs:
119
build:
12-
runs-on: ubuntu-20.04
13-
timeout-minutes: 15
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
1412
strategy:
1513
matrix:
1614
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
@@ -68,17 +66,3 @@ jobs:
6866
run: |
6967
pip install -e ".[async]"
7068
pytest tests/adapter_tests_async/
71-
- name: Run pytype verification (3.8 only)
72-
run: |
73-
python_version=`python -V`
74-
if [ ${python_version:7:3} == "3.8" ]; then
75-
./scripts/run_pytype.sh
76-
fi
77-
- name: Run all tests for codecov (3.9 only)
78-
run: |
79-
python_version=`python -V`
80-
if [ ${python_version:7:3} == "3.9" ]; then
81-
pip install -e ".[async]"
82-
pip install -e ".[testing]"
83-
pytest --cov=slack_bolt/ && bash <(curl -s https://codecov.io/bash)
84-
fi

0 commit comments

Comments
 (0)