File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Release
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ workflow_call :
8+
9+ jobs :
10+ test :
11+ runs-on : large-spot
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Set up Python 3.9
16+ uses : actions/setup-python@v5
17+ with :
18+ python-version : 3.9
19+
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ python -m pip install -r requirements.txt
24+ python -m pip install pytest
25+
26+ - name : Run tests
27+ run : python -m pytest test/model_unit_test.py
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+
10+ test :
11+ uses : ./.github/workflows/release-test.yml
12+
13+ release :
14+ name : Release
15+ runs-on : large-spot
16+ needs : test
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ' 3.9'
24+
25+ - name : Install build dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ python -m pip install build twine
29+
30+ - name : Build package
31+ run : python -m build
32+
33+ - name : Check distribution
34+ run : twine check dist/*
35+
36+ - name : Publish to PyPI
37+ env :
38+ TWINE_USERNAME : __token__
39+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
40+ run : twine upload dist/*
You can’t perform that action at this time.
0 commit comments