-
Notifications
You must be signed in to change notification settings - Fork 1.3k
131 lines (118 loc) · 3.83 KB
/
pull-request.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Pull Request Workflow
on:
pull_request:
branches:
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
PLUGIN_VERSION: ${{ github.event.inputs.plugin-version != null && github.event.inputs.plugin-version || 'LATEST' }}
jobs:
file-changes:
name: File changes detection
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
ui: ${{ steps.changes.outputs.ui }}
translations: ${{ steps.changes.outputs.translations }}
backend: ${{ steps.changes.outputs.backend }}
steps:
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
ui:
- 'ui/**'
translations:
- 'ui/src/translations/**'
backend:
- '!{ui,.github}/**'
token: ${{ secrets.GITHUB_TOKEN }}
frontend:
name: 'Check Frontend'
needs: file-changes
runs-on: ubuntu-latest
timeout-minutes: 60
if: "needs.file-changes.outputs.ui == 'true'"
steps:
- uses: actions/checkout@v4
- id: generate-translations
name: Generate translations
if: "needs.file-changes.outputs.translations == 'true'"
uses: ./.github/actions/generate-translations
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- id: frontend-test
name: Frontend test
uses: ./.github/actions/frontend-test
env:
# to save corepack from itself
COREPACK_INTEGRITY_KEYS: 0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
backend:
name: 'Check Backend'
needs: file-changes
runs-on: ubuntu-latest
timeout-minutes: 60
if: "needs.file-changes.outputs.backend == 'true'"
steps:
- uses: actions/checkout@v4
- name: Backend test
uses: ./.github/actions/backend-test
with:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
sonar-token: ${{ secrets.SONAR_TOKEN }}
github-token: ${{ secrets.GH_PERSONAL_TOKEN }}
google-service-account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
build-artifacts:
name: Build artifacts
needs: file-changes
if: "needs.file-changes.outputs.backend == 'true' || needs.file-changes.outputs.ui == 'true'"
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
docker-tag: ${{ steps.build-artifacts.outputs.docker-tag }}
docker-artifact-name: ${{ steps.build-artifacts.outputs.docker-artifact-name }}
plugins: ${{ steps.build-artifacts.outputs.plugins }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-artifacts
id: build-artifacts
with:
plugin-version: ${{ env.PLUGIN_VERSION }}
e2e:
name: Check E2E
needs: [build-artifacts]
uses: ./.github/workflows/e2e.yml
strategy:
fail-fast: false
matrix:
backends: [ "postgres" ]
with:
tags: oss
backend: ${{ matrix.backends }}
docker-artifact-name: ${{ needs.build-artifacts.outputs.docker-artifact-name }}
docker-image-tag: kestra/kestra:${{ needs.build-artifacts.outputs.docker-tag }}
secrets:
GITHUB_AUTH_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }}
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
end:
name: End
runs-on: ubuntu-latest
if: always()
steps:
# Slack
- name: Slack notification
uses: Gamesight/slack-workflow-status@master
if: ${{ always() && env.SLACK_WEBHOOK_URL != 0 }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
name: GitHub Actions
icon_emoji: ":github-actions:"
channel: "C02DQ1A7JLR"