forked from aws/aws-xray-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.3 KB
/
UnitTesting.yaml
File metadata and controls
52 lines (47 loc) · 1.3 KB
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
name: Unit Testing
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
# "setup-python" action doesn't provide python 3.4 binaries for ubuntu-latest.
# Sticking to Ubuntu 18.04 as recommended here:
# https://github.com/actions/setup-python/issues/185#issuecomment-768232756
runs-on: ubuntu-18.04
env:
py27: 2.7
py34: 3.4
py35: 3.5
py36: 3.6
py37: 3.7
py38: 3.8
py39: 3.9
strategy:
fail-fast: false
matrix:
python-version: [py27, py34, py35, py36, py37, py38, py39]
testenv: [core, ext]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ env[matrix.python-version] }}
- name: Install tox
run: pip install -U tox-factor
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v2
with:
path: |
.tox
~/.cache/pip
key: tox-cache-${{ matrix.python-version }}-${{ matrix.testenv }}-${{ hashFiles('tox.ini') }}
- name: Run tox
run: |
tox -f ${{ matrix.python-version }}-${{ matrix.testenv }}