-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (57 loc) · 1.81 KB
/
tests.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: tests
on:
push:
branches: [main, test-me-*]
tags: '**'
pull_request:
workflow_dispatch:
jobs:
tests:
timeout-minutes: 10
strategy:
matrix:
include:
- 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:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCKER_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCKER_AWS_SECRET_ACCESS_KEY }}
CLIENT_ID: ${{ secrets.DOCKER_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.DOCKER_CLIENT_SECRET }}
CLIENT_SCOPE: ${{ secrets.DOCKER_CLIENT_SCOPE }}
DEFAULT_SERVERS: ${{ secrets.DOCKER_DEFAULT_SERVERS }}
SERVER_CLIENT_ID: ${{ secrets.DOCKER_SERVER_CLIENT_ID }}
SERVER_SECRET: ${{ secrets.DOCKER_SERVER_SECRET }}
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 }}