Skip to content

chore: add Python 3.11 in test.yml (#41) #1

chore: add Python 3.11 in test.yml (#41)

chore: add Python 3.11 in test.yml (#41) #1

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
max-parallel: 7
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- python-version: 3.5
os: ubuntu-20.04
- python-version: 3.6
os: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
- name: "Test: tox tests"
run: |
# run tests with coverage
tox
- name: Report test-coverage to DeepSource
if: ${{ matrix.python-version == '3.11' }}
run: |
# Install the CLI
curl https://deepsource.io/cli | sh
# Send the report to DeepSource
./bin/deepsource report --analyzer test-coverage --key python --value-file coverage.xml