-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.1 KB
/
Copy pathtest.yml
File metadata and controls
41 lines (38 loc) · 1.1 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
name: test
run-name: test invoked by ${{ github.actor }}
on:
- pull_request
- push
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10"]
steps:
- name: check out reposistory
uses: actions/checkout@v3
- name: setup python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: load cached venv(s)
id: cached-venvs
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: install extra dependencies
if: steps.cached-venvs.outputs.cache-hit != 'true'
run: |
poetry add tox="*" tox-gh-actions="*"
- name: run tests
run: |
poetry run tox