-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.15 KB
/
Copy pathpython-test.yml
File metadata and controls
52 lines (41 loc) · 1.15 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: Python tests
on:
workflow_call:
inputs:
versions:
default: "['3.8']"
description: 'The version of python to use'
required: false
type: string
jobs:
tests:
name: ${{ matrix.versions }} Tests
runs-on: ubuntu-latest
strategy:
matrix:
versions: ${{ fromJson(inputs.versions) }}
steps:
- uses: actions/checkout@v3.3.0
with:
fetch-depth: 1
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python ${{ matrix.versions }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.versions }}
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- id: cache-pipenv
uses: actions/cache@v3.3.1
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv install --deploy --dev
- name: Run test suite
run: |
pipenv run test -v