Skip to content

Add test publish workflow #15

Add test publish workflow

Add test publish workflow #15

name: Test pkg-remove action
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
tags: ["v*"]
jobs:
keep-none:
name: Test with keep=0
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Test
id: test
uses: ./pkg-remove
with:
anaconda_token: unset_token
organization: neutronimaging
package_name: ibeatles
label: dev
keep: 0
dry_run: true
- name: Check number files
shell: bash
env:
NUM_REMOVED: ${{ steps.test.outputs.num_removed }}
run: |
echo "Number of files is ${NUM_REMOVED}"
if [ -z "${NUM_REMOVED}" ]; then
echo "Did not get variable"
exit 1
elif [ ! "${NUM_REMOVED}" -gt 0 ]; then
echo "Something went wrong!"
exit 1
fi
keep-all:
name: Test with keep=100
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Test
id: test
uses: ./pkg-remove
with:
anaconda_token: unset_token
organization: neutronimaging
package_name: ibeatles
label: dev
keep: 100
dry_run: true
- name: Check number files
shell: bash
env:
NUM_REMOVED: ${{ steps.test.outputs.num_removed }}
run: |
echo "Number of files is ${NUM_REMOVED}"
if [ -z "${NUM_REMOVED}" ]; then
echo "Did not get variable"
exit 1
elif [ ! "${NUM_REMOVED}" -eq 0 ]; then
echo "Something went wrong!"
exit 1
fi