Skip to content

Migrate deprecated codecov to the latest recommended way #808

Migrate deprecated codecov to the latest recommended way

Migrate deprecated codecov to the latest recommended way #808

Workflow file for this run

# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI Build
on:
push:
branches: [ main ]
pull_request:
jobs:
build:
# Avoiding -latest due to https://github.com/actions/setup-python/issues/162
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
env:
PYTHON_SLACK_SDK_MOCK_SERVER_MODE: 'threading'
CI_LARGE_SOCKET_MODE_PAYLOAD_TESTING_DISABLED: '1'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip wheel
pip install -e ".[testing]"
pip install -e ".[optional]"
- name: Run validation
run: |
python setup.py validate
- name: Run tests for SQLAlchemy v1.4 (backward-compatibility)
run: |
# Install v1.4 for testing
pip install "SQLAlchemy>=1.4,<2"
python setup.py unit_tests --test-target tests/slack_sdk/oauth/installation_store/test_sqlalchemy.py && \
python setup.py unit_tests --test-target tests/slack_sdk/oauth/state_store/test_sqlalchemy.py
- name: Run codecov (only 3.9)
run: |
python_version=`python -V`
if [ ${python_version:7:3} == "3.9" ]; then
# python setup.py validate generates the coverage file
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
fi