File: test.yml

package info (click to toggle)
geventhttpclient 2.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,456 kB
  • sloc: ansic: 16,557; python: 3,823; makefile: 24
file content (48 lines) | stat: -rw-r--r-- 1,858 bytes parent folder | download
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
44
45
46
47
48
name: Tests

on: [push, pull_request]

jobs:
  tests:
    name: ${{ matrix.name }}
    runs-on: ${{ matrix.os }}

    strategy:
      fail-fast: false
      matrix:
        include:
          - {name: Windows, python: '3.11', os: windows-latest, tox: py311}
          - {name: Mac, python: '3.11', os: macos-latest, tox: py311}
          - {name: '3.13', python: '3.13', os: ubuntu-latest, tox: py313}
          - {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312}
          - {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
          - {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
          - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}

    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
      - uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python }}
      - name: Get pip cache dir
        id: pip-cache
        shell: bash
        run: |
          if [ "${{ matrix.os }}" = "windows-latest" ]; then
            echo "::set-output name=dir::$(pip cache dir | sed 's|\\\\|/|g')"  # deprecated way for windows
          else
            echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT   # non-deprecated way of setting variables
          fi
      - name: Cache pip
        uses: actions/cache@v4
        with:
          path: ${{ steps.pip-cache.outputs.dir }}
          key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}
      - name: set full Python version in PY env var
        # See https://pre-commit.com/#github-actions-example
        run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
      - run: python -m pip install tox
      - run: python -m tox -e ${{ matrix.tox }}
        if:  ${{ matrix.os != 'windows-latest'}} # skip tests on windows because they are hanging