mirror of https://github.com/knative/func.git
chore: Quarkus autoupdate action runs somke test (#1723)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
parent
dc3a85112c
commit
c715dabcd0
|
@ -17,6 +17,9 @@ jobs:
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
|
- uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 17
|
||||||
- name: Install NPM deps.
|
- name: Install NPM deps.
|
||||||
run: npm install axios xml2js octokit
|
run: npm install axios xml2js octokit
|
||||||
- name: Create PR
|
- name: Create PR
|
||||||
|
|
|
@ -84,6 +84,19 @@ const updatePlatformInPom = async (pomPath, newPlatform) => {
|
||||||
await writeFile(pomPath, newPomData)
|
await writeFile(pomPath, newPomData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const smokeTest = () => {
|
||||||
|
const subproc = spawn("make", ["test-quarkus"], {stdio: ['inherit', 'inherit', 'inherit']})
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
subproc.on('exit', code => {
|
||||||
|
if (code === 0) {
|
||||||
|
resolve()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reject(new Error("smoke test failed: non-zero exit code"))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
const latestPlatform = await getLatestPlatform()
|
const latestPlatform = await getLatestPlatform()
|
||||||
const prTitle = `chore: update Quarkus platform version to ${latestPlatform}`
|
const prTitle = `chore: update Quarkus platform version to ${latestPlatform}`
|
||||||
|
@ -103,6 +116,7 @@ const main = async () => {
|
||||||
|
|
||||||
await updatePlatformInPom(cePomPath, latestPlatform)
|
await updatePlatformInPom(cePomPath, latestPlatform)
|
||||||
await updatePlatformInPom(httpPomPath, latestPlatform)
|
await updatePlatformInPom(httpPomPath, latestPlatform)
|
||||||
|
await smokeTest()
|
||||||
await prepareBranch(branchName, prTitle)
|
await prepareBranch(branchName, prTitle)
|
||||||
await octokit.rest.pulls.create({
|
await octokit.rest.pulls.create({
|
||||||
owner: owner,
|
owner: owner,
|
||||||
|
|
Loading…
Reference in New Issue