Skip to content

Commit

Permalink
Revert skipping of tests, because the github event is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwh committed Nov 21, 2022
1 parent 6608f9f commit 00c0597
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9693,8 +9693,7 @@ const REF_REGEX = /refs\/(.+)\/(.+)/; // e.g. 'refs/heads/main' or 'refs/tags/12
try {

const ref = github.context.ref;
const commitMsg = github.event.head_commit.message;
console.log(`Reference is ${ref}, commit message is ${commitMsg}`);
console.log(`Reference is ${ref}`);

const [, refType, branch] = ref.match(REF_REGEX);
const isDefaultBranch = DEFAULT_BRANCHES.includes(branch);
Expand All @@ -9719,7 +9718,7 @@ try {
goals = 'clean verify';
}

if (isTag || (!isDefaultBranch && commitMsg.startsWith('[skip tests]'))) {
if (isTag) {
goals = "-Dmaven.test.skip.exec " + goals;
}

Expand Down
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const REF_REGEX = /refs\/(.+)\/(.+)/; // e.g. 'refs/heads/main' or 'refs/tags/12
try {

const ref = github.context.ref;
const commitMsg = github.event.head_commit.message;
console.log(`Reference is ${ref}, commit message is ${commitMsg}`);
console.log(`Reference is ${ref}`);

const [, refType, branch] = ref.match(REF_REGEX);
const isDefaultBranch = DEFAULT_BRANCHES.includes(branch);
Expand All @@ -33,7 +32,7 @@ try {
goals = 'clean verify';
}

if (isTag || (!isDefaultBranch && commitMsg.startsWith('[skip tests]'))) {
if (isTag) {
goals = "-Dmaven.test.skip.exec " + goals;
}

Expand Down

0 comments on commit 00c0597

Please sign in to comment.