File tree Expand file tree Collapse file tree 2 files changed +78
-4
lines changed
Expand file tree Collapse file tree 2 files changed +78
-4
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ name: pytest
33on :
44 push :
55 branches : [ master, dev ]
6- # pull_request:
7- # branches: [ master ]
6+ pull_request :
7+ branches : [ master, dev ]
88
99jobs :
10- build :
10+ test :
1111 runs-on : ubuntu-latest
1212
1313 steps :
2323 run : |
2424 python -m pip install --upgrade pip
2525 pip install -r requirements.txt
26- pip install -e . # Устанавливаем пакет в режиме редактирования для корректных импортов в тестах
26+ # Устанавливаем пакет в режиме редактирования для корректных импортов в тестах
27+ pip install -e .
2728
2829 - name : Run tests with pytest
2930 run : |
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out repository code
13+ uses : actions/checkout@v4
14+
15+ - name : Set up Python
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : ' 3.13'
19+
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install -r requirements.txt
24+ pip install -e .
25+
26+ - name : Run tests with pytest
27+ run : |
28+ pytest
29+
30+ build-and-publish :
31+ needs : test
32+ runs-on : ubuntu-latest
33+ steps :
34+ - name : Check out repository code
35+ uses : actions/checkout@v4
36+
37+ - name : Set up Python
38+ uses : actions/setup-python@v4
39+ with :
40+ python-version : ' 3.13'
41+
42+ - name : Install dependencies
43+ run : |
44+ python -m pip install --upgrade pip
45+ pip install -r requirements.txt
46+ pip install build twine
47+
48+ - name : Build package
49+ run : |
50+ python setup.py sdist bdist_wheel
51+
52+ # - name: Publish to PyPI
53+ # env:
54+ # TWINE_USERNAME: __token__
55+ # TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
56+ # run: |
57+ # twine upload dist/*
58+
59+ - name : Build native application
60+ run : |
61+ python build_native.py
62+ mv dist_native/xmlgenerator dist_native/xmlgenerator-linux-x64
63+
64+ - name : Upload release assets
65+ uses : softprops/action-gh-release@v1
66+ with :
67+ name : ${{ github.ref_name }}
68+ files : |
69+ dist/*.whl
70+ dist/*.tar.gz
71+ dist_native/xmlgenerator-linux-x64
72+ env :
73+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments