forked from opendatahub-io/batch-gateway
-
Notifications
You must be signed in to change notification settings - Fork 2
110 lines (99 loc) · 3.67 KB
/
Copy pathci-integration-tests.yml
File metadata and controls
110 lines (99 loc) · 3.67 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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' || '' }}${{ matrix.enable_dispatcher == 'true' && ', dispatcher' || '' }})
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"
- file_client_type: s3
db_client_type: postgresql
exchange_client_type: redis
enable_dispatcher: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
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' }}
ENABLE_DISPATCHER: ${{ matrix.enable_dispatcher || '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