Skip to content

tests

tests #175

Workflow file for this run

name: tests
on:
push:
branches: [main, test-me-*]
tags: '**'
schedule:
- cron: '0 0 * * *' # Runs at midnight every day
pull_request:
workflow_dispatch:
jobs:
tests:
timeout-minutes: 10
strategy:
matrix:
include:
- os: ubuntu-latest
python: '3.7'
toxenv: py37
- os: ubuntu-latest
python: '3.8'
toxenv: py38
- os: ubuntu-latest
python: '3.9'
toxenv: py39
- os: ubuntu-latest
python: '3.10'
toxenv: py310
- os: ubuntu-latest
python: '3.11'
toxenv: py311
- os: ubuntu-latest
python: '3.12'
toxenv: py312
runs-on: ${{ matrix.os }}
env:
DIASPORA_SDK_CLIENT_ID: ${{ secrets.DIASPORA_SDK_CLIENT_ID }}
DIASPORA_SDK_CLIENT_SECRET: ${{ secrets.DIASPORA_SDK_CLIENT_SECRET }}
CLIENT_SCOPE: ${{ secrets.CLIENT_SCOPE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Get pip cache dir
id: pip-cache-dir
run: echo "PIP_CACHE_DIR=$(pip cache dir)" >> $GITHUB_ENV
- name: Use pip cache
id: pip-cache
uses: actions/cache@v4
with:
path: ${{ env.PIP_CACHE_DIR }}
key: tests-${{ matrix.os }}-pip-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
tests-${{ matrix.os }}-pip-${{ matrix.python }}-
- name: Install Packages
run: python -m pip install --upgrade pip tox setuptools
- name: Run Tox
run: tox -e ${{ matrix.toxenv }}