Skip to content

Commit 48a1157

Browse files
committed
ci(test): add separate test workflow
1 parent 0f44d13 commit 48a1157

File tree

2 files changed

+52
-37
lines changed

2 files changed

+52
-37
lines changed

.github/workflows/deploy-test.yml

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Python Package (Test)
22

33
on:
44
workflow_run:
5-
workflows: [ "Build" ]
6-
# branches: [ "pre-release" ]
5+
workflows: [ Build ]
6+
branches: [ "pre-release" ]
77
types:
88
- completed
99

@@ -14,41 +14,30 @@ jobs:
1414
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1515

1616
steps:
17-
- name: Download repository
18-
uses: actions/download-artifact@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
1919
with:
20-
name: repository
20+
python-version: '3.8'
2121

22-
- name: Unarchive reposiotry
23-
run: tar -xzvf repo.tar.gz
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel twine
2426
25-
- name: Run tests
26-
run: python3 ./run_tests.py --build-dir=build
27-
28-
# - name: Set up Python
29-
# uses: actions/setup-python@v2
30-
# with:
31-
# python-version: '3.8'
32-
33-
# - name: Install dependencies
34-
# run: |
35-
# python -m pip install --upgrade pip
36-
# pip install setuptools wheel twine
37-
38-
# - name: Download artifact
39-
# uses: dawidd6/action-download-artifact@v2
40-
# with:
41-
# workflow: build.yml
42-
# workflow_conclusion: success
43-
# branch: pre-release
44-
# name: native
45-
# path: python/pyspla
46-
47-
# - name: Build and publish
48-
# env:
49-
# TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
50-
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
51-
# run: |
52-
# python setup.py sdist bdist_wheel
53-
# twine upload --verbose --repository testpypi dist/*
54-
# working-directory: python
27+
- name: Download artifact
28+
uses: dawidd6/action-download-artifact@v2
29+
with:
30+
workflow: build.yml
31+
workflow_conclusion: success
32+
branch: pre-release
33+
name: native
34+
path: python/pyspla
35+
36+
- name: Build and publish
37+
env:
38+
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
39+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
40+
run: |
41+
python setup.py sdist bdist_wheel
42+
twine upload --verbose --repository testpypi dist/*
43+
working-directory: python

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Run Tests
2+
3+
on:
4+
workflow_run:
5+
workflows: [ Build ]
6+
# branches: [ "pre-release" ]
7+
types:
8+
- completed
9+
10+
jobs:
11+
deploy:
12+
name: Deploy Python package
13+
runs-on: self-hosted
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
16+
steps:
17+
- name: Download repository
18+
uses: actions/download-artifact@v4
19+
with:
20+
name: repository
21+
22+
- name: Unarchive reposiotry
23+
run: tar -xzvf repo.tar.gz
24+
25+
- name: Run tests
26+
run: python3 ./run_tests.py --build-dir=build

0 commit comments

Comments
 (0)