Skip to content

Commit 7b5aee6

Browse files
authored
support linux/arm64 and add state verifications (#58)
1 parent 499a3bb commit 7b5aee6

11 files changed

+353
-241
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GitHub Action!
77
> versions lower than v0.5.0 will no longer work properly. See [this
88
> issue][path-issue] for more details.
99
10-
> This action assumes a Linux environment, and will _not_ work on Windows or
10+
> This action assumes a Linux environment (amd64 or arm64 architecture), and will _not_ work on Windows or
1111
> MacOS agents.
1212
1313
```yaml
@@ -55,7 +55,6 @@ Optional inputs:
5555
- `skipClusterLogsExport`: if `"true"`, the action will not export the cluster logs
5656
- `verbosity`: numeric log verbosity, (info = 0, debug = 3, trace = 2147483647) (default `"0"`)
5757
- `quiet`: silence all stderr output (default `"false"`)
58-
5958

6059
Example using optional inputs:
6160

__tests__/kind/post.test.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import os from 'os';
21
import path from 'path';
32
import { KindPostService } from '../../src/kind/post';
43

54
const testEnvVars = {
65
INPUT_VERBOSITY: '3',
76
INPUT_QUIET: 'true',
8-
INPUT_CONFIG: 'some-path',
97
INPUT_NAME: 'some-name',
108
INPUT_KUBECONFIG: 'some-kubeconfig-path',
11-
GITHUB_WORKSPACE: '/home/runner/repo',
9+
GITHUB_JOB: 'kind',
10+
RUNNER_TEMP: '/home/runner/work/_temp/',
1211
};
1312

1413
describe('checking input parsing', function () {
@@ -27,13 +26,12 @@ describe('checking input parsing', function () {
2726

2827
it('correctly parse input', () => {
2928
const service: KindPostService = KindPostService.getInstance();
30-
expect(service.configFile).toEqual(testEnvVars.INPUT_CONFIG);
3129
expect(service.kubeConfigFile).toEqual(testEnvVars.INPUT_KUBECONFIG);
3230
expect(service.skipClusterDeletion).toEqual(false);
3331
expect(service.skipClusterLogsExport).toEqual(false);
3432
});
3533

36-
it('correctly set skipClusterCreation', () => {
34+
it('correctly set skipClusterDeletion', () => {
3735
process.env['INPUT_SKIPCLUSTERDELETION'] = 'true';
3836
const service: KindPostService = KindPostService.getInstance();
3937
expect(service.skipClusterDeletion).toEqual(true);
@@ -60,7 +58,9 @@ describe('checking input parsing', function () {
6058
expect(args).toEqual([
6159
'export',
6260
'logs',
63-
path.join(os.tmpdir(), 'kind/some-name/logs'),
61+
path.normalize(
62+
'/home/runner/work/_temp/1c1900ec-8f4f-5069-a966-1d3072cc9723'
63+
),
6464
'--verbosity',
6565
testEnvVars.INPUT_VERBOSITY,
6666
'--quiet',

action.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@ inputs:
55
version:
66
description: "Version of Kind to use (default v0.11.1)"
77
default: "v0.11.1"
8+
required: true
89
config:
910
description: "Path (relative to the root of the repository) to a kind config file"
1011
image:
1112
description: "Node Docker image to use for booting the cluster"
1213
name:
1314
description: "Cluster name (default kind)"
1415
default: "kind"
16+
required: true
1517
wait:
1618
description: "Wait for control plane node to be ready (default 300s)"
1719
default: "300s"
1820
kubeconfig:
19-
description: "sets kubeconfig path instead of $KUBECONFIG or $HOME/.kube/config"
21+
description: "Sets kubeconfig path instead of $KUBECONFIG or $HOME/.kube/config"
2022
skipClusterCreation:
2123
description: "If true, the action will not create a cluster, just acquire the tools"
2224
default: "false"

0 commit comments

Comments
 (0)