Skip to content

Sync/release/3.12.1 #2009

Sync/release/3.12.1

Sync/release/3.12.1 #2009

Workflow file for this run

---
name: CI
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
unit-tests:
name: "Python ${{ matrix.python-version }} ${{ matrix.tox-env }}"
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
tox-env: [""]
steps:
- name: Step 1 - Checkout repository
uses: actions/checkout@v4
- name: Step 2 - Install python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Step 3 - Do some caching for python packages
uses: actions/cache@v4
id: cache-python-packages
with:
path: ${{ env.pythonLocation }}
key: ${{matrix.python-version}}-${{ hashFiles('requirements-tox.txt') }}-${{ env.pythonLocation }}
restore-keys: |
${{matrix.python-version}}-${{ hashFiles('requirements-tox.txt') }}-
- name: Step 3.5 - Install system deps for extras
run: |
sudo apt update && sudo apt-get install libsnappy-dev
- name: Step 4 - Install dependencies to run tox
if: steps.cache-python-packages.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements-tox.txt
python -m pip install --upgrade tox-gh-actions
- name: Step 5 - Run tox targets for ${{ matrix.python-version }} ${{matrix.tox-env}}
run: |
if [[ -z "${{ matrix.tox-env }}" ]]
then
python -m tox
else
python -m tox -e ${{ matrix.tox-env }}
fi