diff options
author | engn33r <engn33r@users.noreply.github.com> | 2021-02-27 14:00:08 -0500 |
---|---|---|
committer | engn33r <engn33r@users.noreply.github.com> | 2021-02-27 14:00:08 -0500 |
commit | fbb037befd8205ae3e06670b70e57e7e09cf4ef3 (patch) | |
tree | 0d37bdcf3ed5d60265e39604f4782ba3b63fb144 | |
parent | a402a3b3afe8060e6ab3d89702cbd7677b499cd8 (diff) | |
download | websocket-client-fbb037befd8205ae3e06670b70e57e7e09cf4ef3.tar.gz |
Add multi-OS multi-Python version strategy to GitHub Action
-rw-r--r-- | .github/workflows/build.yml | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce2533c..d625922 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,20 +3,40 @@ name: Testing GitHub Actions on: [push] jobs: - dothis: - runs-on: ubuntu-latest + code-coverage: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - - name: Set up websocket-client - run: | - pip install six + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - run: | + TEST_WITH_INTERNET=1 python setup.py test pip install coverage pip install codecov - python -c "import setuptools; print(setuptools.__version__)" coverage run --source=websocket --omit="/*/tests/__init__.py","*/tests/test_cookiejar.py","*/tests/test_websocket.py" websocket/tests/test_websocket.py coverage report coverage xml - name: Codecov uses: codecov/codecov-action@v1.2.1 + + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9] + os: [ubuntu-latest, macOS-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} wheel + run: | + python -m pip install -U pip setuptools wheel + python -c "import setuptools; print(setuptools.__version__)" + TEST_WITH_INTERNET=0 python setup.py test + python setup.py check -r -s |