-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (38 loc) · 1.26 KB
/
manual-js-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}
FORCE_COLOR: 1
jobs:
run_tests:
runs-on: ubuntu-latest
container: ghcr.io/marmotitude/s3-tester:tests
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: "Run with tests, clients and profiles from user input"
run: |
echo copying specs from the workspace volume to the image workspace...
cp $GITHUB_WORKSPACE/spec/js/* /app/spec/js/.
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