forked from temporalio/temporal
-
Notifications
You must be signed in to change notification settings - Fork 0
155 lines (137 loc) · 4.88 KB
/
features-integration.yml
File metadata and controls
155 lines (137 loc) · 4.88 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Features Integration
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
permissions: read-all
concurrency: # Auto-cancel existing runs in the PR when a new commit is pushed
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-docker-image:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
- name: Build binaries
uses: ./.github/actions/build-binaries
with:
snapshot: true
single-arch: amd64
- name: Build Docker images
uses: ./.github/actions/build-docker-images
with:
push: false
tag-latest: false
platform: linux/amd64
load: true
- name: Get Docker image tag
id: image-tag
uses: actions/github-script@v8
with:
script: |
const ref = context.ref.replace('refs/heads/', '').replace('refs/tags/', '');
const branchName = `branch-${ref}`;
let safeTag = branchName.replace(/[^a-zA-Z0-9._-]/g, '-');
safeTag = safeTag.toLowerCase();
safeTag = safeTag.replace(/^[^a-z0-9]+/, '');
safeTag = safeTag.substring(0, 128);
core.setOutput('tag', safeTag);
- name: Save Docker image as artifact
run: |
docker save temporaliotest/server:${{ steps.image-tag.outputs.tag }} -o /tmp/temporal-server.tar
docker save temporaliotest/admin-tools:${{ steps.image-tag.outputs.tag }} -o /tmp/temporal-admin-tools.tar
echo ${{ steps.image-tag.outputs.tag }} > /tmp/image_tag
- name: Prepare artifact
working-directory: ${{ github.workspace }}
run: |
# Upload-artifact has no good way to flatten paths, so we need to move the compose file
# to avoid some disgustingly long inner path inside the artifact zip.
cp ./develop/docker-compose/docker-compose.yml /tmp/docker-compose.yml
- name: Upload Docker artifact
uses: actions/upload-artifact@v4
with:
name: temporal-server-docker
path: |
/tmp/temporal-server.tar
/tmp/temporal-admin-tools.tar
/tmp/image_tag
/tmp/docker-compose.yml
retention-days: 7
feature-tests-ts:
needs: build-docker-image
uses: temporalio/features/.github/workflows/typescript.yaml@main
with:
# This field is not actually used by these workflow if docker-image-artifact-name
# is set, but it's marked as required, so supply some string.
version: __latest_features_docker_image__
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker
feature-tests-go:
needs: build-docker-image
uses: temporalio/features/.github/workflows/go.yaml@main
with:
version: __latest_features_docker_image__
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker
feature-tests-go-chasm-scheduler:
needs: build-docker-image
uses: temporalio/features/.github/workflows/go.yaml@main
with:
version: __latest_features_docker_image__
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker
dynamic-config-values: |
history.enableTransitionHistory:
- value: true
history.enableChasm:
- value: true
history.enableCHASMSchedulerCreation:
- value: true
feature-tests-python:
needs: build-docker-image
uses: temporalio/features/.github/workflows/python.yaml@main
with:
version: __latest_features_docker_image__
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker
feature-tests-java:
needs: build-docker-image
uses: temporalio/features/.github/workflows/java.yaml@main
with:
version: __latest_features_docker_image__
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker
feature-tests-dotnet:
needs: build-docker-image
uses: temporalio/features/.github/workflows/dotnet.yaml@main
with:
version: __latest_features_docker_image__
version-is-repo-ref: false
docker-image-artifact-name: temporal-server-docker
feature-tests-status:
name: Tests Status
needs:
- feature-tests-ts
- feature-tests-go
- feature-tests-go-chasm-scheduler
- feature-tests-python
- feature-tests-java
- feature-tests-dotnet
runs-on: ubuntu-latest
if: always()
env:
RESULTS: ${{ toJSON(needs.*.result) }}
steps:
- name: Check results
run: |
if [[ -n $(echo "$RESULTS" | jq '.[] | select (. != "success")') ]]; then
exit 1
fi