summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: c7f4aab02484e6c558609213072e63165b5dd9b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Testing GitHub Actions

on: [push]

jobs:
  code-coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - run: |
          pip install six
          TEST_WITH_INTERNET=1 python setup.py test
          pip install coverage
          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: [3.8, 3.9]
        os: [ubuntu-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: |
          pip install -U pip setuptools wheel twine six
          python -c "import setuptools; print('Setup tools version'); print(setuptools.__version__)"
          python setup.py sdist
          TEST_WITH_INTERNET=1 python setup.py test
          twine check dist/*