Skip to content

ci(prune): always use latest action versions #9

ci(prune): always use latest action versions

ci(prune): always use latest action versions #9

name: test prune script
on:
push:
paths:
- 'scripts/prune/**'
- .github/workflows/test-prune-script.yml
branches: [main]
pull_request:
paths:
- 'scripts/prune/**'
- .github/workflows/test-prune-script.yml
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@main
- name: Set up Python 3.13
uses: actions/setup-python@main
with:
python-version: '3.x'
- name: Cache pip dependencies
uses: actions/cache@main
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('scripts/prune/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
working-directory: scripts/prune
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run unit tests
working-directory: scripts/prune
run: |
echo "Running unit tests"
python tests/test_prune.py
- name: Run integration tests
working-directory: scripts/prune
run: |
echo "Running integration tests"
python tests/test_integration.py
- name: Run all tests via test runner
working-directory: scripts/prune
run: |
echo "Running comprehensive test suite"
echo "Using Python: $(which python)"
python test_runner.py
- name: Check script can show help
working-directory: scripts/prune
run: |
echo "Testing CLI help interface"
python main.py --help
# - name: Test dry-run functionality
# working-directory: scripts/prune
# run: |
# echo "Testing dry-run functionality"
# python main.py --container test-container --registry dockerhub --prune-all-untagged --dry-run || echo "Expected to fail without credentials"