-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (57 loc) · 1.78 KB
/
release.yml
File metadata and controls
61 lines (57 loc) · 1.78 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
53
54
55
56
57
58
59
60
61
name: release new version
on:
push:
branches: [master]
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- name: download last changes
uses: actions/checkout@v1
- name: setting up python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install deployment dependencies
run: pip install setuptools wheel twine
- name: build package wheel
run: python setup.py sdist bdist_wheel
- name: release on pipy
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
codecov:
runs-on: ubuntu-latest
steps:
- name: downloading last version
uses: actions/checkout@v1
- name: setting up python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install package dependencies
run: pip install .
- name: install test dependencies
run: pip install .[tests]
- name: generate codecov report
run: python -m pytest test.py --cov=./ --cov-report=xml; codecov
working-directory: tests
env:
TEST_CSV: ${{ secrets.TEST_CSV }}
TEST_JSON: ${{ secrets.TEST_JSON }}
TEST_EMAIL: ${{ secrets.TEST_EMAIL }}
DEEPINT_TOKEN: ${{ secrets.DEEPINT_TOKEN }}
DEEPINT_ORGANIZATION: ${{ secrets.DEEPINT_ORGANIZATION }}
TEST_EXTERNAL_SOURCE_URL: ${{ secrets.TEST_EXTERNAL_SOURCE_URL }}
- name: upload coverage
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
files: ./coverage.xml
flags: tests