Skip to content

Commit

Permalink
CI: Add test for uploads with multiple labels
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
matthewfeickert committed Jan 24, 2024
1 parent 3eb3a42 commit f41df7e
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Build a wheel and a sdist
run: |
PYTHONWARNINGS=error,default::DeprecationWarning python -m build --outdir ./dist tests/test_package
python -m build --outdir ./dist tests/test_package
- name: Verify the distribution
run: twine check --strict dist/*
Expand All @@ -53,6 +53,34 @@ jobs:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}

- name: Build a wheel and a sdist
run: |
# Bump version to avoid wheel name conflicts
sed -i 's/0.0.1/0.0.2/g' tests/test_package/pyproject.toml
rm ./dist/*
python -m build --outdir ./dist tests/test_package
- name: Test upload with non-main label
uses: ./
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
anaconda_nightly_upload_labels: test

- name: Build a wheel and a sdist
run: |
# Bump version to avoid wheel name conflicts
sed -i 's/0.0.2/0.0.3/g' tests/test_package/pyproject.toml
rm ./dist/*
python -m build --outdir ./dist tests/test_package
- name: Test upload with multiple labels
uses: ./
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
anaconda_nightly_upload_labels: dev,test

cleanup:
runs-on: ubuntu-latest
needs: [test]
Expand Down

0 comments on commit f41df7e

Please sign in to comment.