only run if CI=true and delete kind command to clean workspace

Signed-off-by: Matteo Silvestri <matteosilv@gmail.com>
This commit is contained in:
Matteo Silvestri
2022-07-28 17:08:38 +02:00
parent cbf0cbbb98
commit 88d227e8e8
2 changed files with 6 additions and 4 deletions
+4 -1
View File
@@ -195,7 +195,7 @@ jobs:
- name: lint
run: yarn backstage-cli repo lint --since origin/master
- name: bootstrap kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.14.0/kind-linux-amd64
@@ -224,6 +224,9 @@ jobs:
BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres9.ports[5432] }}
BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING: mysql://root:root@localhost:${{ job.services.mysql8.ports[3306] }}/ignored
- name: delete kind command
run: rm kind
- name: ensure clean working directory
run: |
if files=$(git ls-files --exclude-standard --others --modified) && [[ -z "$files" ]]; then
@@ -25,13 +25,12 @@ import {
} from './KubernetesContainerRunner';
import { RunContainerOptions } from './ContainerRunner';
import { PassThrough } from 'stream';
import { isDockerDisabledForTests } from '@backstage/backend-test-utils';
const describeIfDocker = isDockerDisabledForTests() ? describe.skip : describe;
const describeIfCI = Boolean(process.env.CI) ? describe : describe.skip;
jest.setTimeout(10 * 1000);
describeIfDocker('KubernetesContainerRunner', () => {
describeIfCI('KubernetesContainerRunner', () => {
const kubeConfig = new KubeConfig();
kubeConfig.loadFromDefault();
const name = 'kube-runner';