mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-05-01 23:54:25 +00:00
test: atualiza libs para usar versão mais recente do node
This commit is contained in:
parent
3968d6ed6e
commit
85d8c8c4cd
3 changed files with 58 additions and 58 deletions
2
.github/workflows/actionlint.yaml
vendored
2
.github/workflows/actionlint.yaml
vendored
|
|
@ -8,7 +8,7 @@ jobs:
|
||||||
actionlint:
|
actionlint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@v4
|
||||||
- name: "Lint workflow files"
|
- name: "Lint workflow files"
|
||||||
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest
|
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
|
|
@ -6,14 +6,14 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@v4 # v4.2.2
|
||||||
|
|
||||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
- uses: actions/setup-node@v4 # v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
|
|
||||||
- name: Setup NPM Cache
|
- name: Setup NPM Cache
|
||||||
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
-uses: actions/cache@v4 # v4.2.1
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
@ -33,17 +33,17 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@v4 # v4.2.2
|
||||||
|
|
||||||
- name: Run docker compose
|
- name: Run docker compose
|
||||||
run: docker compose up -d vault
|
run: docker compose up -d vault
|
||||||
|
|
||||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
- uses: actions/setup-node@v4 # v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
|
|
||||||
- name: Setup NPM Cache
|
- name: Setup NPM Cache
|
||||||
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
-uses: actions/cache@v4 # v4.2.1
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
@ -67,17 +67,17 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@v4 # v4.2.2
|
||||||
|
|
||||||
- name: Run docker compose
|
- name: Run docker compose
|
||||||
run: docker compose up -d vault
|
run: docker compose up -d vault
|
||||||
|
|
||||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
- uses: actions/setup-node@v4 # v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
|
|
||||||
- name: Setup NPM Cache
|
- name: Setup NPM Cache
|
||||||
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
-uses: actions/cache@v4 # v4.2.1
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
@ -163,17 +163,17 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@v4 # v4.2.2
|
||||||
|
|
||||||
- name: Run docker compose
|
- name: Run docker compose
|
||||||
run: docker compose up -d vault-tls
|
run: docker compose up -d vault-tls
|
||||||
|
|
||||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
- uses: actions/setup-node@v4 # v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
|
|
||||||
- name: Setup NPM Cache
|
- name: Setup NPM Cache
|
||||||
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
|
-uses: actions/cache@v4 # v4.2.1
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
|
||||||
90
.github/workflows/local-test.yaml
vendored
90
.github/workflows/local-test.yaml
vendored
|
|
@ -18,56 +18,56 @@ jobs:
|
||||||
name: local-test
|
name: local-test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@v4 # v4.2.2
|
||||||
|
|
||||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
- uses: actions/setup-node@v4 # v4.2.0
|
||||||
with:
|
with:
|
||||||
node-version: '24'
|
node-version: "24"
|
||||||
|
|
||||||
- name: NPM Install
|
- name: NPM Install
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: NPM Build
|
- name: NPM Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Setup Vault
|
- name: Setup Vault
|
||||||
run: node ./integrationTests/e2e/setup.js
|
run: node ./integrationTests/e2e/setup.js
|
||||||
env:
|
env:
|
||||||
VAULT_HOST: localhost
|
VAULT_HOST: localhost
|
||||||
VAULT_PORT: 8200
|
VAULT_PORT: 8200
|
||||||
|
|
||||||
- name: Import Secrets
|
- name: Import Secrets
|
||||||
id: import-secrets
|
id: import-secrets
|
||||||
# use the local changes
|
# use the local changes
|
||||||
uses: ./
|
uses: ./
|
||||||
# run against a specific version of vault-action
|
# run against a specific version of vault-action
|
||||||
# uses: hashicorp/vault-action@v2.1.2
|
# uses: hashicorp/vault-action@v2.1.2
|
||||||
with:
|
with:
|
||||||
url: http://localhost:8200
|
url: http://localhost:8200
|
||||||
method: token
|
method: token
|
||||||
token: testtoken
|
token: testtoken
|
||||||
secrets: |
|
secrets: |
|
||||||
secret/data/test-json-string jsonString;
|
secret/data/test-json-string jsonString;
|
||||||
secret/data/test-json-data jsonData;
|
secret/data/test-json-data jsonData;
|
||||||
|
|
||||||
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
with:
|
with:
|
||||||
github-token: "foobar"
|
github-token: "foobar"
|
||||||
script: |
|
script: |
|
||||||
const { JSONSTRING, JSONDATA } = process.env
|
const { JSONSTRING, JSONDATA } = process.env
|
||||||
|
|
||||||
console.log(`string ${JSONSTRING}`)
|
console.log(`string ${JSONSTRING}`)
|
||||||
console.log(`data ${JSONDATA}`)
|
console.log(`data ${JSONDATA}`)
|
||||||
const str = JSONDATA
|
const str = JSONDATA
|
||||||
|
|
||||||
let valid = true
|
let valid = true
|
||||||
try {
|
try {
|
||||||
JSON.parse(str)
|
JSON.parse(str)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
valid = false
|
valid = false
|
||||||
}
|
}
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log("valid json")
|
console.log("valid json")
|
||||||
} else {
|
} else {
|
||||||
console.log("not valid json")
|
console.log("not valid json")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue