* fix broken build - switch to ncc build (#56) * switch to ncc build * update * bump ncc * Vidya reddy/vercel ncc (#58) * updated action file with node16 * Code consistency using prettier and its workflow * Enforce Prettier * code fix * code fix * code fix * add vercel/ncc to build script * modified action file Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> * Bump @actions/core from 1.2.6 to 1.9.1 (#62) Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.6 to 1.9.1. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) --- updated-dependencies: - dependency-name: "@actions/core" dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Added the bug report and feature request form (#63) * Added the bug report and feature request form * updated the url * Systax error fixes (#64) * Bump jose from 2.0.5 to 2.0.6 (#65) Bumps [jose](https://github.com/panva/jose) from 2.0.5 to 2.0.6. - [Release notes](https://github.com/panva/jose/releases) - [Changelog](https://github.com/panva/jose/blob/v2.0.6/CHANGELOG.md) - [Commits](https://github.com/panva/jose/compare/v2.0.5...v2.0.6) --- updated-dependencies: - dependency-name: jose dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update @actions/core (#68) to address https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ * Bump qs from 6.5.2 to 6.5.3 (#73) Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README with v3 version (#72) * Bump json5 from 2.2.1 to 2.2.3 (#75) Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump minimatch from 3.0.4 to 3.1.2 (#74) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add node modules and compiled JavaScript from main Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: David Gamero <david340804@gmail.com> Co-authored-by: Vidya Reddy <59590642+Vidya2606@users.noreply.github.com> Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sumner Warren <sumner.warren@gmail.com> Co-authored-by: Oliver King <oking3@uncc.edu>
145 lines
5.3 KiB
YAML
145 lines
5.3 KiB
YAML
name: Run Integration Tests
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
|
|
jobs:
|
|
kubeconfig-method-integration-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Source Code
|
|
id: checkout-code
|
|
uses: actions/checkout@v2
|
|
- name: Npm Install and Build
|
|
id: npm-build
|
|
run: |
|
|
npm install
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Set Context
|
|
uses: ./
|
|
with:
|
|
method: kubeconfig
|
|
context: exp-scratch
|
|
kubeconfig: |
|
|
apiVersion: v1
|
|
clusters:
|
|
- cluster:
|
|
certificate-authority: fake-ca-file
|
|
server: https://1.2.3.4
|
|
name: development
|
|
- cluster:
|
|
insecure-skip-tls-verify: true
|
|
server: https://5.6.7.8
|
|
name: scratch
|
|
contexts:
|
|
- context:
|
|
cluster: development
|
|
namespace: frontend
|
|
user: developer
|
|
name: dev-frontend
|
|
- context:
|
|
cluster: development
|
|
namespace: storage
|
|
user: developer
|
|
name: dev-storage
|
|
- context:
|
|
cluster: scratch
|
|
namespace: default
|
|
user: experimenter
|
|
name: exp-scratch
|
|
current-context: ""
|
|
kind: Config
|
|
preferences: {}
|
|
users:
|
|
- name: developer
|
|
user:
|
|
client-certificate: fake-cert-file
|
|
client-key: fake-key-file
|
|
- name: experimenter
|
|
user:
|
|
password: some-password
|
|
username: exp
|
|
- name: Vertify Results
|
|
run: |
|
|
echo "$EXPECTED_KC" > /tmp/expected_kc.json
|
|
DIFF=$(diff <(jq -S -c . $KUBECONFIG) <(jq -S -c . /tmp/expected_kc.json))
|
|
if [ "$DIFF" != "" ]; then exit 1; else echo -e "Kubeconfig matches expected"; fi
|
|
env:
|
|
EXPECTED_KC: |
|
|
{
|
|
"apiVersion": "v1",
|
|
"clusters": [
|
|
{
|
|
"cluster": {
|
|
"certificate-authority": "fake-ca-file",
|
|
"insecure-skip-tls-verify": false,
|
|
"server": "https://1.2.3.4"
|
|
},
|
|
"name": "development"
|
|
},
|
|
{
|
|
"cluster": {
|
|
"insecure-skip-tls-verify": true,
|
|
"server": "https://5.6.7.8"
|
|
},
|
|
"name": "scratch"
|
|
}
|
|
],
|
|
"contexts": [
|
|
{
|
|
"context": {
|
|
"cluster": "development",
|
|
"name": "dev-frontend",
|
|
"namespace": "frontend",
|
|
"user": "developer"
|
|
},
|
|
"name": "dev-frontend"
|
|
},
|
|
{
|
|
"context": {
|
|
"cluster": "development",
|
|
"name": "dev-storage",
|
|
"namespace": "storage",
|
|
"user": "developer"
|
|
},
|
|
"name": "dev-storage"
|
|
},
|
|
{
|
|
"context": {
|
|
"cluster": "scratch",
|
|
"name": "exp-scratch",
|
|
"namespace": "default",
|
|
"user": "experimenter"
|
|
},
|
|
"name": "exp-scratch"
|
|
}
|
|
],
|
|
"current-context": "exp-scratch",
|
|
"kind": "Config",
|
|
"preferences": {
|
|
},
|
|
"users": [
|
|
{
|
|
"name": "developer",
|
|
"user": {
|
|
"client-certificate": "fake-cert-file",
|
|
"client-key": "fake-key-file"
|
|
}
|
|
},
|
|
{
|
|
"name": "experimenter",
|
|
"user": {
|
|
"password": "some-password",
|
|
"username": "exp"
|
|
}
|
|
}
|
|
]
|
|
}
|