Integration Tests #112
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: | |
| push: | |
| branches: | |
| - main | |
| - 'release-*' | |
| schedule: | |
| - cron: '0 3 * * *' # Every day at 3:00 AM UTC | |
| workflow_dispatch: # Allow manual trigger | |
| concurrency: | |
| group: integration-tests-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| integration-tests: | |
| name: Integration Tests (${{ matrix.file_client_type }}, ${{ matrix.db_client_type }}, ${{ matrix.exchange_client_type }}${{ matrix.enable_gie == 'true' && ', gie' || '' }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - file_client_type: s3 | |
| db_client_type: postgresql | |
| exchange_client_type: redis | |
| - file_client_type: fs | |
| db_client_type: postgresql | |
| exchange_client_type: redis | |
| - file_client_type: s3 | |
| db_client_type: postgresql | |
| exchange_client_type: valkey | |
| - file_client_type: s3 | |
| db_client_type: redis | |
| exchange_client_type: redis | |
| - file_client_type: s3 | |
| db_client_type: valkey | |
| exchange_client_type: valkey | |
| - file_client_type: s3 | |
| db_client_type: postgresql | |
| exchange_client_type: redis | |
| enable_gie: "true" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install Kind | |
| run: go install sigs.k8s.io/kind@latest | |
| - name: Install Helm | |
| uses: azure/setup-helm@v5 | |
| - name: Deploy dev environment | |
| run: make dev-deploy | |
| env: | |
| FILE_CLIENT_TYPE: ${{ matrix.file_client_type }} | |
| DB_CLIENT_TYPE: ${{ matrix.db_client_type }} | |
| EXCHANGE_CLIENT_TYPE: ${{ matrix.exchange_client_type }} | |
| ENABLE_GIE: ${{ matrix.enable_gie || 'false' }} | |
| - name: Run integration tests | |
| run: make test-e2e | |
| - name: Open issue on failure | |
| if: failure() | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const { data: existing } = await github.rest.issues.listForRepo({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| state: 'open', | |
| labels: 'bug,ci' | |
| }); | |
| if (existing.some(i => i.title.startsWith('Integration tests failed'))) { | |
| console.log('Skipping: open integration test failure issue already exists'); | |
| return; | |
| } | |
| const content = await github.rest.repos.getContent({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| path: '.github/CODEOWNERS' | |
| }); | |
| const text = Buffer.from(content.data.content, 'base64').toString(); | |
| const owners = [...new Set((text.match(/@[\w-]+/g) || []).map(h => h.slice(1)))]; | |
| await github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: `Integration tests failed on ${new Date().toISOString().split('T')[0]}`, | |
| body: `[Run logs](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`, | |
| labels: ['bug', 'ci'], | |
| assignees: owners | |
| }); | |
| - name: Cleanup | |
| if: always() | |
| run: make dev-rm-cluster |