diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 71b2b6b..8deffb3 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -12,32 +12,36 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: + - '3.7' + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' steps: - - uses: actions/checkout@v3.1.0 - with: - fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4.1.0 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/cache@v2.1.4 + - uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-ver }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-ver }}-pip- + python-version: "${{matrix.python-version}}" + cache: "pip" + cache-dependency-path: | + **/*requirements*.txt + - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools - pip install -Ur requirements.txt + pip install --upgrade pip setuptools + pip install -Ur requirements-dev.txt + - name: Test with pytest - run: | - pytest + run: pytest -vv env: PYTHONDEVMODE: 1 PYTHONPATH: . - - uses: codecov/codecov-action@v3.1.1 + + - uses: codecov/codecov-action@v3 with: - name: build-${{ matrix.python-ver }} + name: build-${{ matrix.python-version }} fail_ci_if_error: true diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..bc04b49 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1 @@ +-r requirements.txt