Skip to content

Commit f2ef3f1

Browse files
committed
Move ugly blocks to actions-ext
1 parent fdea3fe commit f2ef3f1

File tree

7 files changed

+43
-71
lines changed

7 files changed

+43
-71
lines changed

cpp/.github/workflows/build.yaml.jinja

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,14 @@ jobs:
139139
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
140140
if: matrix.os == 'windows-latest'
141141

142-
- name: Test wheel install
143-
run: |
144-
python -m venv /tmp/test-wheel
145-
/tmp/test-wheel/bin/pip install dist/*.whl
146-
/tmp/test-wheel/bin/python -c "import {{module}}"
142+
- uses: actions-ext/python/test-wheel@main
143+
with:
144+
module: {{module}}
147145
if: matrix.os == 'ubuntu-latest'
148146

149-
- name: Test sdist install
150-
run: |
151-
python -m venv /tmp/test-sdist
152-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
153-
/tmp/test-sdist/bin/python -c "import {{module}}"
147+
- uses: actions-ext/python/test-sdist@main
148+
with:
149+
module: {{module}}
154150
if: matrix.os == 'ubuntu-latest'
155151

156152
- uses: actions/upload-artifact@v7

cppjswasm/.github/workflows/build.yaml.jinja

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,14 @@ jobs:
121121
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
122122
if: matrix.os == 'windows-latest'
123123

124-
- name: Test wheel install
125-
run: |
126-
python -m venv /tmp/test-wheel
127-
/tmp/test-wheel/bin/pip install dist/*.whl
128-
/tmp/test-wheel/bin/python -c "import {{module}}"
124+
- uses: actions-ext/python/test-wheel@main
125+
with:
126+
module: {{module}}
129127
if: matrix.os == 'ubuntu-latest'
130128

131-
- name: Test sdist install
132-
run: |
133-
python -m venv /tmp/test-sdist
134-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
135-
/tmp/test-sdist/bin/python -c "import {{module}}"
129+
- uses: actions-ext/python/test-sdist@main
130+
with:
131+
module: {{module}}
136132
if: matrix.os == 'ubuntu-latest'
137133

138134
- uses: actions/upload-artifact@v7

js/.github/workflows/build.yaml.jinja

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,14 @@ jobs:
8484
run: make dist
8585
if: matrix.os == 'ubuntu-latest'
8686

87-
- name: Test wheel install
88-
run: |
89-
python -m venv /tmp/test-wheel
90-
/tmp/test-wheel/bin/pip install dist/*.whl
91-
/tmp/test-wheel/bin/python -c "import {{module}}"
87+
- uses: actions-ext/python/test-wheel@main
88+
with:
89+
module: {{module}}
9290
if: matrix.os == 'ubuntu-latest'
9391

94-
- name: Test sdist install
95-
run: |
96-
python -m venv /tmp/test-sdist
97-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
98-
/tmp/test-sdist/bin/python -c "import {{module}}"
92+
- uses: actions-ext/python/test-sdist@main
93+
with:
94+
module: {{module}}
9995
if: matrix.os == 'ubuntu-latest'
10096

10197
- uses: actions/upload-artifact@v7

jupyter/.github/workflows/build.yaml.jinja

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,14 @@ jobs:
8484
run: make dist
8585
if: matrix.os == 'ubuntu-latest'
8686

87-
- name: Test wheel install
88-
run: |
89-
python -m venv /tmp/test-wheel
90-
/tmp/test-wheel/bin/pip install dist/*.whl
91-
/tmp/test-wheel/bin/python -c "import {{module}}"
87+
- uses: actions-ext/python/test-wheel@main
88+
with:
89+
module: {{module}}
9290
if: matrix.os == 'ubuntu-latest'
9391

94-
- name: Test sdist install
95-
run: |
96-
python -m venv /tmp/test-sdist
97-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
98-
/tmp/test-sdist/bin/python -c "import {{module}}"
92+
- uses: actions-ext/python/test-sdist@main
93+
with:
94+
module: {{module}}
9995
if: matrix.os == 'ubuntu-latest'
10096

10197
- uses: actions/upload-artifact@v7

python/.github/workflows/build.yaml.jinja

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,13 @@ jobs:
7474
- name: Make dist
7575
run: make dist
7676

77-
- name: Test wheel install
78-
run: |
79-
python -m venv /tmp/test-wheel
80-
/tmp/test-wheel/bin/pip install dist/*.whl
81-
/tmp/test-wheel/bin/python -c "import {{module}}"
82-
83-
- name: Test sdist install
84-
run: |
85-
python -m venv /tmp/test-sdist
86-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
87-
/tmp/test-sdist/bin/python -c "import {{module}}"
77+
- uses: actions-ext/python/test-wheel@main
78+
with:
79+
module: {{module}}
80+
81+
- uses: actions-ext/python/test-sdist@main
82+
with:
83+
module: {{module}}
8884

8985
- uses: actions/upload-artifact@v7
9086
with:

rust/.github/workflows/build.yaml.jinja

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,14 @@ jobs:
101101
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
102102
if: matrix.os != 'ubuntu-latest'
103103

104-
- name: Test wheel install
105-
run: |
106-
python -m venv /tmp/test-wheel
107-
/tmp/test-wheel/bin/pip install dist/*.whl
108-
/tmp/test-wheel/bin/python -c "import {{module}}"
104+
- uses: actions-ext/python/test-wheel@main
105+
with:
106+
module: {{module}}
109107
if: matrix.os == 'ubuntu-latest'
110108

111-
- name: Test sdist install
112-
run: |
113-
python -m venv /tmp/test-sdist
114-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
115-
/tmp/test-sdist/bin/python -c "import {{module}}"
109+
- uses: actions-ext/python/test-sdist@main
110+
with:
111+
module: {{module}}
116112
if: matrix.os == 'ubuntu-latest'
117113

118114
- uses: actions/upload-artifact@v7

rustjswasm/.github/workflows/build.yaml.jinja

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,14 @@ jobs:
110110
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
111111
if: matrix.os != 'ubuntu-latest'
112112

113-
- name: Test wheel install
114-
run: |
115-
python -m venv /tmp/test-wheel
116-
/tmp/test-wheel/bin/pip install dist/*.whl
117-
/tmp/test-wheel/bin/python -c "import {{module}}"
113+
- uses: actions-ext/python/test-wheel@main
114+
with:
115+
module: {{module}}
118116
if: matrix.os == 'ubuntu-latest'
119117

120-
- name: Test sdist install
121-
run: |
122-
python -m venv /tmp/test-sdist
123-
/tmp/test-sdist/bin/pip install dist/*.tar.gz
124-
/tmp/test-sdist/bin/python -c "import {{module}}"
118+
- uses: actions-ext/python/test-sdist@main
119+
with:
120+
module: {{module}}
125121
if: matrix.os == 'ubuntu-latest'
126122

127123
- uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)