-
Notifications
You must be signed in to change notification settings - Fork 87
60 lines (56 loc) · 1.78 KB
/
python-tests.yaml
File metadata and controls
60 lines (56 loc) · 1.78 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
53
54
55
56
57
58
59
name: Python Packages Test
on:
push:
branches:
- master
paths:
- python/sqlcommenter-python/**
pull_request:
paths:
- python/sqlcommenter-python/**
jobs:
unittests:
env:
# We use these variables to convert between tox and GHA version literals
py36: 3.6
py37: 3.7
py38: 3.8
py39: 3.9
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: [ py36, py37, py38, py39 ]
os: [ ubuntu-20.04 ]
steps:
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v2
- name: Set up Python ${{ env[matrix.python-version] }}
uses: actions/setup-python@v2
with:
python-version: ${{ env[matrix.python-version] }}
- name: Install tox
run: pip install -U tox-factor
- name: run tox
run: tox -e '${{ matrix.python-version }}-{django21,django22,django30,django31,django32,psycopg2,flask,generic,sqlalchemy}'
working-directory: ./python/sqlcommenter-python
lint:
strategy:
fail-fast: false
matrix:
tox-environment: [ "lint" ]
name: ${{ matrix.tox-environment }}
runs-on: ubuntu-20.04
steps:
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install tox
run: pip install -U tox
- name: run tox
run: tox -e flake8
working-directory: ./python/sqlcommenter-python