Update dependency net.masterthought:cucumber-reporting to v5.8.4 #1962
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
name: Build_And_Run_Unit_Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build with Gradle and run unit tests | |
uses: gradle/gradle-build-action@093dfe9d598ec5a42246855d09b49dc76803c005 | |
with: | |
arguments: clean build --refresh-dependencies | |
- name: Get Latest Commit ID and save in GITHUB_ENV | |
run: | | |
echo "COMMIT_ID=$(git rev-parse HEAD | head -c 10)" >> "$GITHUB_ENV" | |
- name: Update README with latest commit id and push to repo | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "actions@github.com" | |
git status | |
BRANCH_NAME=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') | |
echo "Running on branch: '$BRANCH_NAME'" | |
if [[ "$BRANCH_NAME" = "main" ]]; then | |
git pull --rebase origin main | |
echo "COMMIT_ID=$COMMIT_ID" | |
awk -v id="$COMMIT_ID" '{gsub("commit-.*-blue", "commit-"id"-blue")}1' README.md > README_new.md | |
mv README_new.md README.md | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "There are changes in 'main'. Update README" | |
git add README.md | |
git commit -m "Update README with latest commit ID - $COMMIT_ID" | |
git push -u origin main | |
else | |
echo "No local changes in 'main'. Nothing to update in the README." | |
fi | |
else | |
echo "Not running in 'main'. No need to update README for branch: '$BRANCH_NAME'" | |
fi | |
env: | |
PAT_TOKEN: ${{ secrets.TESWIZ_PAT }} | |
- name: Trigger Workflow in getting-started-with-teswiz | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.TESWIZ_REPO_DISPATCH }} | |
repository: znsio/getting-started-with-teswiz | |
event-type: UpdateREADME | |
client-payload: '{"teswiz_commit_id":"teswiz updated" }' | |
- name: Save Test Artifacts | |
if: ${{ always() }} # Ensure this step runs even if the tests fail | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-unit | |
path: target |