|
| 1 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
| 2 | +name: CI Build |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ main ] |
| 7 | + pull_request: |
| 8 | + branches: [ main ] |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + python-version: ['3.6', '3.7', '3.8', '3.9'] |
| 16 | + |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v2 |
| 19 | + - name: Set up Python ${{ matrix.python-version }} |
| 20 | + uses: actions/setup-python@v2 |
| 21 | + with: |
| 22 | + python-version: ${{ matrix.python-version }} |
| 23 | + - name: Install dependencies |
| 24 | + run: | |
| 25 | + python setup.py install |
| 26 | + pip install -U pip |
| 27 | + pip install "pytest>=5,<6" "pytest-cov>=2,<3" |
| 28 | + - name: Run tests without aiohttp |
| 29 | + run: | |
| 30 | + pytest tests/slack_bolt/ |
| 31 | + pytest tests/scenario_tests/ |
| 32 | + - name: Run tests for adapters |
| 33 | + run: | |
| 34 | + pip install -e ".[adapter]" |
| 35 | + pytest tests/adapter_tests/ |
| 36 | + - name: Run async tests |
| 37 | + run: | |
| 38 | + pip install -e ".[async]" |
| 39 | + pip install "pytest-asyncio<1" |
| 40 | + pytest tests/slack_bolt_async/ |
| 41 | + pytest tests/scenario_tests_async/ |
| 42 | + pytest tests/adapter_tests_async/ |
| 43 | + - name: Run pytype verification & codecov |
| 44 | + run: | |
| 45 | + python_version=`python -V` |
| 46 | + if [ ${python_version:7:3} == "3.8" ]; then |
| 47 | + pip install "pytype" && pytype slack_bolt/ |
| 48 | + pytest --cov=slack_bolt/ && bash <(curl -s https://codecov.io/bash) |
| 49 | + fi |
0 commit comments