Integration Tests #281
This file contains hidden or 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: | |
| 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|wakeup-test|curl-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" |