-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (59 loc) · 1.6 KB
/
python.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Python
on:
push:
branches:
- release
paths:
- python/**
- server/**
- .github/workflows/python.yaml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Creating virtual environment
run: |
sudo apt install python3-venv
python3 -m venv .venv
working-directory: "python"
- name: Configure Poetry with PyPI token
run: |
source .venv/bin/activate
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
working-directory: "python"
- name: Debug Poetry Config
run: |
source .venv/bin/activate
poetry config --list
working-directory: "python"
- name: Install dependencies
run: |
source .venv/bin/activate
poetry install --no-interaction
pip install .
working-directory: "python"
- name: Install pyteset
run: |
source .venv/bin/activate
pip install pytest
working-directory: "python"
- name: Run tests
run: |
source .venv/bin/activate
pytest tests
working-directory: "python"
build:
needs: [ test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Copy readme
run: cp README.md python/README.md
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
package_directory: "python"