-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.17 KB
/
test.yaml
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
name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Cache Poetry dependencies
uses: actions/cache@v2
with:
path: |
~/.cache
~/.local/share/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-poetry-
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install poetry ${{ matrix.poetry-version }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry==1.3.2
- name: View poetry --help
run: poetry --help
- name: Install dependencies
shell: bash
run: python -m poetry install
- name: Create Environment File
run: echo "PYTHONPATH=$(pwd):$(pwd)/src" >> ${{ runner.workspace }}/.env
- name: Test with pytest
run: python -m poetry run pytest --cov=deepuq
env:
PYTHONPATH: ${{ env.PYTHONPATH }}
ENV_FILE: ${{ runner.workspace }}/.env