refactored tests and added docker build test, repaired state.network

This commit is contained in:
Nikola Jokic
2022-06-03 14:10:15 +02:00
parent 8bc1fbbec5
commit 4b7efe88ef
9 changed files with 204 additions and 113 deletions

View File

@@ -2,6 +2,7 @@
/* eslint-disable @typescript-eslint/no-require-imports */
/* eslint-disable import/no-commonjs */
import * as core from '@actions/core'
import { env } from 'process'
// Import this way otherwise typescript has errors
const exec = require('@actions/exec')
@@ -42,6 +43,12 @@ export function sanitize(val: string): string {
return newNameBuilder.join('')
}
export function checkEnvironment(): void {
if (!env.GITHUB_WORKSPACE) {
throw new Error('GITHUB_WORKSPACE is not set')
}
}
// isAlpha accepts single character and checks if
// that character is [a-zA-Z]
function isAlpha(val: string): boolean {