Manually-triggered Javascript tests #2
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: "Manually-triggered Javascript tests" | |
on: | |
workflow_dispatch: | |
inputs: | |
profiles: | |
description: "List of profiles from $PROFILES secret env var" | |
type: string | |
required: false | |
default: "br-ne1,br-se1" | |
bun_test_args: | |
description: "arguments for the bun test command" | |
type: string | |
required: false | |
default: "" | |
env: | |
PROFILES: ${{ secrets.profiles }} | |
jobs: | |
run_tests: | |
runs-on: ubuntu-latest | |
container: ghcr.io/marmotitude/s3-tester:tests | |
steps: | |
- name: "Run with tests, clients and profiles from user input" | |
run: | | |
cd /app | |
bun --version | |
./entrypoint.sh js-test.sh --profiles ${{ inputs.profiles }} -- ${{ inputs.bun_test_args }} | |
- name: CLEAN_BUCKETS | |
run: | | |
for profile in ${{ vars.PROFILES_TO_CLEAN }}; do | |
aws s3 ls --profile $profile | grep "test-" | awk '{print $3}' | while read -r bucket; do | |
aws s3 rb s3://$bucket --profile $profile --force | |
done | |
done |