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
|
||||
with:
|
||||
node-version: 18
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 17
|
||||
- name: Install NPM deps.
|
||||
run: npm install axios xml2js octokit
|
||||
- name: Create PR
|
||||
|
|
|
@ -84,6 +84,19 @@ const updatePlatformInPom = async (pomPath, newPlatform) => {
|
|||
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 latestPlatform = await getLatestPlatform()
|
||||
const prTitle = `chore: update Quarkus platform version to ${latestPlatform}`
|
||||
|
@ -103,6 +116,7 @@ const main = async () => {
|
|||
|
||||
await updatePlatformInPom(cePomPath, latestPlatform)
|
||||
await updatePlatformInPom(httpPomPath, latestPlatform)
|
||||
await smokeTest()
|
||||
await prepareBranch(branchName, prTitle)
|
||||
await octokit.rest.pulls.create({
|
||||
owner: owner,
|
||||
|
|
Loading…
Reference in New Issue