Update tests + cleanup
This commit is contained in:
@@ -2,7 +2,12 @@ const core = require('@actions/core')
|
||||
|
||||
// All variables we need from the runtime are loaded here
|
||||
const getContext = require('./context')
|
||||
const { getArtifactMetadata, getPagesDeploymentStatus, createPagesDeployment, cancelPagesDeployment } = require('./api-client')
|
||||
const {
|
||||
getArtifactMetadata,
|
||||
getPagesDeploymentStatus,
|
||||
createPagesDeployment,
|
||||
cancelPagesDeployment
|
||||
} = require('./api-client')
|
||||
|
||||
const temporaryErrorStatus = {
|
||||
unknown_status: 'Unable to get deployment status.',
|
||||
@@ -58,15 +63,12 @@ class Deployment {
|
||||
core.debug(`Action ID: ${this.actionsId}`)
|
||||
core.debug(`Actions Workflow Run ID: ${this.workflowRun}`)
|
||||
|
||||
core.info("Getting artifact's metadata...")
|
||||
const artifactData = await getArtifactMetadata({
|
||||
githubToken: this.githubToken,
|
||||
runId: this.workflowRun,
|
||||
artifactName: this.artifactName
|
||||
})
|
||||
|
||||
console.log(artifactData)
|
||||
|
||||
if (artifactData?.size > ONE_GIGABYTE) {
|
||||
core.warning(
|
||||
`Uploaded artifact size of ${artifactData?.size} bytes exceeds the allowed size of ${SIZE_LIMIT_DESCRIPTION}. Deployment might fail.`
|
||||
@@ -241,4 +243,4 @@ class Deployment {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { Deployment, MAX_TIMEOUT, ONE_GIGABYTE, SIZE_LIMIT_DESCRIPTION }
|
||||
module.exports = { Deployment, MAX_TIMEOUT, ONE_GIGABYTE, SIZE_LIMIT_DESCRIPTION }
|
||||
|
||||
Reference in New Issue
Block a user