Skip to content

it-command

it-command #7

Workflow file for this run

name: it-command
on:
repository_dispatch:
types: [it-command]
jobs:
pullrequest_IT:
runs-on: ubuntu-22.04
env:
PR_NUMBER: ${{ github.event.client_payload.github.payload.issue.number }}
PR_P: ${{ github.event.issue.number }}
steps:
- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
- name: Update success comment
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
> Action has been started. [Click here to see the action](${{ steps.vars.outputs.run-url }})
- name: Git checkout
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ env.PR_NUMBER }}/merge"
- name: Cache node modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache node install
uses: actions/cache@v4
with:
path: "node_install"
key: ${{ runner.os }}-node_install-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-node_install-
- name: Cleanup resources
run: |
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
df -h
- name: Set JAVA_HOME
run: |
echo "JAVA_8_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
echo "JAVA_11_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
echo "JAVA_17_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV
- name: Java Environment
run: env | grep '^JAVA'
- name: Maven build
run: |
./mvnw --batch-mode -Pit-module -DskipTests clean install
- name: Whole Integration Test
if: github.event.client_payload.slash_command.args.all == ''
working-directory: ./agent-module/plugins-it
run: ../../mvnw --batch-mode clean install -Pit-module -Dmaven.test.failure.ignore=true
- name: Integration Test
if: github.event.client_payload.slash_command.args.all != ''
working-directory: ./agent-module/plugins-it
run: ../../mvnw --batch-mode clean install -Pit-module -pl ${{ github.event.client_payload.slash_command.args.all }} -Dmaven.test.failure.ignore=true
- name: Collect reports
working-directory: ./agent-module/plugins-it
run: |
mkdir -p ./temp
find . -regex ".*/target/failsafe-reports/TEST.*\.xml" -exec cp "{}" ./temp \;
ls temp
- name: Publish Unit Test Results
id: test_reporter
uses: dorny/test-reporter@v1
with:
name: pinpoint-test-results
reporter: java-junit
path: "./agent-module/plugins-it/temp/TEST-*.xml"
fail-on-error: "false"
- name: Update comment
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
> ![title](https://img.shields.io/static/v1?label=Tests&message=${{ steps.test_reporter.outputs.passed }}_passed&color=green) ![title](https://img.shields.io/static/v1?label=Tests&message=${{ steps.test_reporter.outputs.failed }}_failed&color=red)