-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (34 loc) · 1.06 KB
/
ci.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
name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry config virtualenvs.create false # Avoids creating an additional virtual environment
- name: Install dependencies
run: poetry install --no-interaction --no-root --all-extras
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$GITHUB_WORKSPACE/src" >> $GITHUB_ENV
- name: Test with pytest
run: poetry run pytest --cov=prophetverse --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
files: ./coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}