-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (36 loc) · 1.37 KB
/
integration-test.yml
File metadata and controls
41 lines (36 loc) · 1.37 KB
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: Integration Tests
on:
schedule:
- cron: '0 2 * * *' # Daily at 2 AM UTC
workflow_call:
jobs:
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
with:
go-version-file: 'go.mod'
- name: Run Integration Tests
env:
CS_TOKEN: ${{ secrets.CS_TOKEN }}
CS_API: ${{ secrets.CS_API }}
CS_TEAM_ID: ${{ secrets.CS_TEAM_ID }}
run: make test-int
- name: Cleanup Orphaned Test Resources
if: always() # Run even if tests fail
env:
CS_TOKEN: ${{ secrets.CS_TOKEN }}
CS_API: ${{ secrets.CS_API }}
CS_TEAM_ID: ${{ secrets.CS_TEAM_ID }}
run: |
echo "Cleaning up any orphaned test workspaces..."
# List all workspaces and delete any with test name prefixes
./cs list workspaces -t $CS_TEAM_ID | grep -E "cli-(test|git-test|pipeline-test|log-test|sync-test|open-test|setenv-test|edge-test)-" | awk '{print $2}' | while read ws_id; do
if [ ! -z "$ws_id" ]; then
echo "Deleting orphaned workspace: $ws_id"
./cs delete workspace -w $ws_id --yes || true
fi
done
echo "Cleanup complete"