debug #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration Tests | |
on: [pull_request, push] | |
permissions: | |
packages: write | |
jobs: | |
integration-tests: | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
concurrency: | |
group: integration-tests | |
strategy: | |
matrix: | |
tests: | |
- title: '1a - Single: Untagged' | |
purpose: 'Removes all untagged images (single arch)' | |
folder: 'single-untagged' | |
- title: '1b - Multi: Untagged' | |
purpose: 'Removes all untagged images (multi arch)' | |
folder: 'multi-untagged' | |
- title: '2a - Single: Tagged' | |
purpose: 'Removes images with specific tag (single arch)' | |
folder: 'single-tagged' | |
tags: 'uclibc-1.35,uclibc-1.36' | |
- title: '2b - Multi: Tagged' | |
purpose: 'Removes images with specific tag (multi arch)' | |
folder: 'multi-tagged' | |
tags: 'uclibc-1.35,uclibc-1.36' | |
- title: '3a - Single: Keep N Tagged' | |
purpose: 'Removes all but the newest 2 tagged images (single arch)' | |
folder: 'single-keep-n-tagged' | |
keep-n-tagged: 2 | |
exclude-tags: dummy | |
- title: '3b - Multi: Keep N Tagged' | |
purpose: 'Removes all but the newest 2 tagged images (multi arch)' | |
folder: 'multi-keep-n-tagged' | |
keep-n-tagged: 2 | |
exclude-tags: dummy | |
- title: '4a - Single: Keep N Untagged' | |
purpose: | |
'Removes all but the newest 2 untagged images (single arch)' | |
folder: 'single-keep-n-untagged' | |
keep-n-untagged: 2 | |
- title: '4b - Multi: Keep N Untagged' | |
purpose: 'Removes all but the newest 2 untagged images (multi arch)' | |
folder: 'multi-keep-n-untagged' | |
keep-n-untagged: 2 | |
- title: '5 - Dry-Run' | |
purpose: 'No packages are removed' | |
folder: 'dry-run' | |
dry-run: true | |
- title: '6 - Missing Digests' | |
purpose: 'Looks for missing digests' | |
folder: 'missing-images' | |
tags: 'uclibc-1.34' | |
steps: | |
# Setup | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Check Format | |
run: npm run format:check | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm run ci-test | |
- name: Build Tester | |
run: npm run ci-tester | |
# Execution of respective test | |
- name: 'Starting Test: ${{ matrix.tests.title }}' | |
run: | | |
echo "Purpose of test: ${{ matrix.tests.purpose }}" | |
TAGS="" | |
if [ ! -z "${{ matrix.tests.tags }}" ]; then | |
TAGS="--tags ${{ matrix.tests.tags }}" | |
fi | |
KEEP_N_TAGGED="" | |
if [ ! -z "${{ matrix.tests.keep-n-tagged }}" ]; then | |
KEEP_N_TAGGED="--keep-n-tagged ${{ matrix.tests.keep-n-tagged }}" | |
fi | |
KEEP_N_UNTAGGED="" | |
if [ ! -z "${{ matrix.tests.keep-n-untagged }}" ]; then | |
KEEP_N_UNTAGGED="--keep-n-untagged ${{ matrix.tests.keep-n-untagged }}" | |
fi | |
EXCLUDE_TAGS="" | |
if [ ! -z "${{ matrix.tests.exclude-tags }}" ]; then | |
EXCLUDE_TAGS="--exclude-tags ${{ matrix.tests.exclude-tags }}" | |
fi | |
DRY_RUN="FALSE" | |
if [ ! -z "${{ matrix.tests.dry-run }}" ]; then | |
DRY_RUN="TRUE" | |
fi | |
export TAGS | |
export KEEP_N_TAGGED | |
export KEEP_N_UNTAGGED | |
export EXCLUDE_TAGS | |
export DRY_RUN | |
- name: ' > Priming Test Environment' | |
run: | | |
node citester/index.js --token ${{ secrets.GITHUB_TOKEN }} \ | |
--directory tests/${{ matrix.tests.folder }} \ | |
--mode prime | |
- name: ' > Running Workflow' | |
uses: ./ | |
with: | |
tags: ${{ env.TAGS }} | |
keep_n_tagged: ${{ env.KEEP_N_TAGGED }} | |
keep_n_untagged: ${{ env.KEEP_N_UNTAGGED }} | |
exclude_tags: ${{ env.EXCLUDE_TAGS }} | |
dry_run: ${{ env.DRY_RUN }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Validate Test Results - Multi Tagged | |
run: | | |
node citester/index.js --token ${{ secrets.GITHUB_TOKEN }} \ | |
--directory tests/multi-tagged --mode validate | |
- name: ' > Validating Outcome' | |
run: | | |
node citester/index.js --token ${{ secrets.GITHUB_TOKEN }} \ | |
--directory tests/${{ matrix.tests.folder }} \ | |
--mode validate |