forked from jbosstm/narayana
-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (90 loc) · 3.29 KB
/
performance.yml
File metadata and controls
101 lines (90 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: performance
on:
workflow_call:
inputs:
jdk_version:
description: 'JDK version'
required: true
type: string
pull_request_repo:
description: 'Repository to check out'
required: true
type: string
default: 'jbosstm/narayana'
pull_request_ref:
description: 'Branch or commit to test'
required: true
type: string
environment_variables:
description: 'Environment variables'
required: false
type: string
default: '{}'
# Only run the latest job
concurrency:
group: 'performance @ ${{ github.workflow }} @ ${{ github.head_ref || github.ref }} @ jdk${{ inputs.jdk_version }}'
cancel-in-progress: true
jobs:
performance-test:
name: Testing PERFORMANCE with JDK ${{ inputs.jdk_version }}
runs-on: ubuntu-latest
steps:
- name: Load Dynamic Environment Variables
uses: actions/github-script@v7
if: ${{ inputs.environment_variables != '' && inputs.environment_variables != '{}' }}
env:
ENV_JSON: ${{ inputs.environment_variables }}
with:
script: |
const envs = JSON.parse(process.env.ENV_JSON);
for (const [key, value] of Object.entries(envs)) {
core.exportVariable(key, value);
core.info(`Set ${key}=${value}`);
}
- name: Log run context
run: |
echo "Triggered by: ${{ github.event_name }}"
echo "Repository: ${{ inputs.pull_request_repo || github.repository }}"
echo "Branch/Ref: ${{ inputs.pull_request_ref || github.ref }}"
- name: Checkout code
uses: actions/checkout@v5
with:
repository: '${{ inputs.pull_request_repo || github.repository }}'
ref: ${{ inputs.pull_request_ref || github.ref }}
- name: Set up JDK ${{ inputs.jdk_version }}
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ inputs.jdk_version }}
cache: 'maven'
- name: Remove Narayana and WildFly from the Maven cache
run: |
rm -rf ~/.m2/repository/org/jboss/narayana
rm -rf ~/.m2/repository/org/wildfly
- name: PERFORMANCE testing axis
id: performance
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
PROFILE=PERFORMANCE ./.github/scripts/narayana.sh
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.performance.conclusion == 'failure' || cancelled() && steps.performance.conclusion == 'cancelled' }}
with:
retention-days: 30
name: performance-logs-jdk${{ inputs.jdk_version }}
path: |
**/*.*log*
**/ObjectStore*/**
**/tx-object-store/**
**/*tx-object-store.zip
**/target/*surefire-reports*/**
**/target/*failsafe-reports*/**
if-no-files-found: warn
- name: Uploading PERFORMANCE results
uses: actions/upload-artifact@v4
with:
retention-days: 30
name: performance-results-jdk${{ inputs.jdk_version }}
path: |
**/target/**/*.csv
if-no-files-found: error