Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Testing pipeline with build yaml and run_count #35524

Merged
merged 7 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/build-client-server-count.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Client, Server & Run only Cypress
name: Build Client, Server & Run only Cypress with count

on:
repository_dispatch:
Expand All @@ -14,6 +14,7 @@ jobs:
pr: ${{steps.args.outputs.pr}}
runId: ${{steps.args.outputs.runId}}
matrix_count: ${{steps.matrix.outputs.matrix_count}}
run_count: ${{ steps.args.outputs.run_count }}
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v4
Expand All @@ -27,12 +28,18 @@ jobs:
id: args
run: |
echo "pr=${{ github.event.client_payload.pull_request.number }}" >> $GITHUB_OUTPUT
echo "run_count=${{ github.event.client_payload.pull_request.number }}" >> $GITHUB_OUTPUT
checkArg=`echo '${{toJSON(github.event.client_payload.slash_command.args.named)}}' | jq 'has("runId")'`
if [[ $checkArg == 'true' ]]; then
echo "runId=${{ github.event.client_payload.slash_command.args.named.runId }}" >> $GITHUB_OUTPUT
else
echo "runId=0" >> $GITHUB_OUTPUT
fi
checkRunCount=`echo '${{ toJSON(github.event.client_payload.slash_command.args.named) }}' | jq 'has("run_count")'`
if [[ $checkRunCount == 'true' ]]; then
echo "run_count=${{ github.event.client_payload.slash_command.args.named.run_count }}" >> $GITHUB_OUTPUT
else
echo "run_count=1" >> $GITHUB_OUTPUT

- name: Get the diff from base branch
continue-on-error: true
Expand Down Expand Up @@ -131,6 +138,7 @@ jobs:
secrets: inherit
with:
pr: ${{fromJson(needs.file-check.outputs.pr)}}
run_count: ${{fromJson(needs.file-check.outputs.run_count)}}

ci-test-limited-existing-docker-image:
needs: [file-check]
Expand All @@ -142,6 +150,7 @@ jobs:
with:
pr: ${{fromJson(needs.file-check.outputs.pr)}}
previous-workflow-run-id: ${{ fromJson(needs.file-check.outputs.runId) }}
run_count: ${{fromJson(needs.file-check.outputs.run_count)}}

ci-test-limited-result:
needs: [file-check, ci-test-limited]
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ jobs:
# actions/setup-node@v4 doesn’t work properly with Yarn 3
# when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488
# Restoring the cache manually instead
- name: Restore Yarn cache
if: steps.run_result.outputs.run_result != 'success'
uses: actions/cache@v4
with:
path: |
app/client/.yarn/cache
app/client/node_modules/.cache/webpack/
key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}
# - name: Restore Yarn cache
# if: steps.run_result.outputs.run_result != 'success'
# uses: actions/cache@v4
# with:
# path: |
# app/client/.yarn/cache
# app/client/node_modules/.cache/webpack/
# key: v1-yarn3-${{ hashFiles('app/client/yarn.lock') }}

# Install all the dependencies
- name: Install dependencies
Expand Down
Loading