Skip to content

Commit 4b6b0f5

Browse files
committed
2 parents ced5e79 + 4416d1b commit 4b6b0f5

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

.github/workflows/pipy_release.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
name: Publish PyTorchLayerViz to PyPI
1+
name: Test and Publish PyTorchLayerViz to PyPI
22

33
on:
44
push:
55
tags:
6-
- '*'
6+
- '*'
77

88
jobs:
9-
build-n-publish:
10-
name: Build and publish PyTorchLayerViz to PyPI
9+
test-and-publish:
10+
name: Test and publish PyTorchLayerViz to PyPI
1111
runs-on: ubuntu-18.04
1212
steps:
13-
- uses: actions/checkout@master
13+
- uses: actions/checkout@v2
14+
with:
15+
ref: main
1416
- name: Set up Python 3.12
1517
uses: actions/setup-python@v3
1618
with:
1719
python-version: '3.12'
18-
- name: Install pypa/setuptools
19-
run: >-
20-
python -m
21-
pip install wheel
22-
- name: Extract tag name
23-
id: tag
24-
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
25-
- name: Update version in setup.py
26-
run: >-
27-
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
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 torch torchvision matplotlib Pillow
25+
- name: Run unit tests
26+
run: |
27+
python -m unittest discover -s test -p 'test_get_feature_maps.py'
2828
- name: Build a binary wheel
29-
run: >-
29+
run: |
3030
python setup.py sdist bdist_wheel
3131
- name: Publish PyTorchLayerViz to PyPI
32-
uses: pypa/gh-action-pypi-publish@master
32+
uses: pypa/gh-action-pypi-publish@v1.5.0
3333
with:
34-
password: ${{ secrets.PYPI_API_TOKEN }}
34+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)