-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Improve update-issues-on-release * feat: Improve workflow testing tools * feat: Log uncommited files from update-gradle-dependencies workflow * feat: Improve existing workflow tests * fix: Add missing step names * fix: Fix shellcheck comments
- Loading branch information
1 parent
a472c9d
commit fcd206e
Showing
14 changed files
with
105 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
.github/workflows/tests/add-milestone-to-pull-requests/test-pull-request.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$0")/../env.sh" | ||
testworkflow pull_request |
3 changes: 0 additions & 3 deletions
3
.github/workflows/tests/add-milestone-to-pull-requests/test.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# Move to project root directory | ||
FILE_PATH=$(dirname "$0") | ||
cd $FILE_PATH/../../../../ | ||
|
||
export COMMON_ACT_ARGS="--container-architecture linux/amd64 --secret GITHUB_TOKEN="$(gh auth token)" --verbose" | ||
function testworkflow() { | ||
local EVENT_TYPE=$1 | ||
# Get workflow name | ||
local TEST_PATH | ||
TEST_PATH=$(dirname "$(readlink -f "${BASH_SOURCE[1]}")") | ||
local WORKFLOW_NAME | ||
WORKFLOW_NAME=$(basename "$TEST_PATH") | ||
local WORKFLOW_FILE=.github/workflows/${WORKFLOW_NAME}.yaml | ||
local PAYLOAD_FILE=${TEST_PATH}/payload-${EVENT_TYPE//_/-}.json | ||
# Move to project root directory | ||
local FILE_PATH | ||
FILE_PATH=$(dirname "$0") | ||
cd "$FILE_PATH/../../../../" || exit 1 | ||
# Check if workflow file and payload file exist | ||
if [ ! -f "$WORKFLOW_FILE" ]; then | ||
echo "Workflow file not found: $WORKFLOW_FILE" | ||
exit 1 | ||
fi | ||
if [ ! -f "$PAYLOAD_FILE" ]; then | ||
echo "Payload file not found: $PAYLOAD_FILE" | ||
exit 1 | ||
fi | ||
# Run workflow using act | ||
act "${EVENT_TYPE}" \ | ||
--workflows "${WORKFLOW_FILE}" \ | ||
--eventpath "${PAYLOAD_FILE}" \ | ||
--container-architecture linux/amd64 \ | ||
--secret GITHUB_TOKEN="$(gh auth token)" \ | ||
--verbose | ||
} |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
.github/workflows/tests/increment-milestone-on-tag/test-create.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$0")/../env.sh" | ||
testworkflow create |
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
.github/workflows/tests/update-issues-on-release/payload-release.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"release": { | ||
"name": "1.39.0", | ||
"html_url": "https://github.com/DataDog/dd-trace-java/releases/tag/v1.39.0" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
.github/workflows/tests/update-issues-on-release/payload-workflow-dispatch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"inputs": { | ||
"milestone": "1.39.0" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
.github/workflows/tests/update-issues-on-release/test-release.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$0")/../env.sh" | ||
testworkflow release |
3 changes: 3 additions & 0 deletions
3
.github/workflows/tests/update-issues-on-release/test-workflow-dispatch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$0")/../env.sh" | ||
testworkflow workflow_dispatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters