Skip to content

Commit b579d79

Browse files
CI: Add test for uploads with multiple labels (#54)
* Add test uploads for non-main label 'test' and for multiple labels in a comma seperated list. As attempting to apply multiple labels through repeated upload of the same package will fail as the package already exists, bump the version number of the test package to generate multiple packages that can be uploaded with different labels.
1 parent 3eb3a42 commit b579d79

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
python -m pip install build twine
3535
python -m pip list
3636
37-
- name: Build a wheel and a sdist
37+
- name: Build v0.0.1 wheel and sdist
3838
run: |
39-
PYTHONWARNINGS=error,default::DeprecationWarning python -m build --outdir ./dist tests/test_package
39+
python -m build --outdir ./dist tests/test_package
4040
4141
- name: Verify the distribution
4242
run: twine check --strict dist/*
@@ -53,6 +53,34 @@ jobs:
5353
artifacts_path: dist
5454
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
5555

56+
- name: Build v0.0.2 wheel and sdist
57+
run: |
58+
# Bump version to avoid wheel name conflicts
59+
sed -i 's/0.0.1/0.0.2/g' tests/test_package/pyproject.toml
60+
rm ./dist/*
61+
python -m build --outdir ./dist tests/test_package
62+
63+
- name: Test upload with non-main label
64+
uses: ./
65+
with:
66+
artifacts_path: dist
67+
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
68+
anaconda_nightly_upload_labels: test
69+
70+
- name: Build v0.0.3 wheel and sdist
71+
run: |
72+
# Bump version to avoid wheel name conflicts
73+
sed -i 's/0.0.2/0.0.3/g' tests/test_package/pyproject.toml
74+
rm ./dist/*
75+
python -m build --outdir ./dist tests/test_package
76+
77+
- name: Test upload with multiple labels
78+
uses: ./
79+
with:
80+
artifacts_path: dist
81+
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
82+
anaconda_nightly_upload_labels: dev,test
83+
5684
cleanup:
5785
runs-on: ubuntu-latest
5886
needs: [test]

0 commit comments

Comments
 (0)