Skip to content

Fix flaky test Count GroupBy (#9003) #2

Fix flaky test Count GroupBy (#9003)

Fix flaky test Count GroupBy (#9003) #2

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