mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-04-09 13:40:06 +00:00
chore: add auto
This commit is contained in:
parent
fbe0bd395b
commit
54b24ddb30
3 changed files with 909 additions and 23 deletions
86
.github/workflows/build.yml
vendored
Normal file
86
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
vault:
|
||||
image: vault:1.2.3
|
||||
ports:
|
||||
- 8200/tcp
|
||||
env:
|
||||
VAULT_DEV_ROOT_TOKEN_ID: testtoken
|
||||
options: --cap-add=IPC_LOCK
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js 10.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: npm install
|
||||
run: npm ci
|
||||
- name: npm run test
|
||||
run: npm run test
|
||||
env:
|
||||
CI: true
|
||||
- name: npm run test:integration
|
||||
run: npm run test:integration
|
||||
env:
|
||||
VAULT_HOST: localhost
|
||||
VAULT_PORT: ${{ job.services.vault.ports[8200] }}
|
||||
CI: true
|
||||
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
vault:
|
||||
image: vault:1.2.3
|
||||
ports:
|
||||
- 8200/tcp
|
||||
env:
|
||||
VAULT_DEV_ROOT_TOKEN_ID: testtoken
|
||||
options: --cap-add=IPC_LOCK
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js 10.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: npm install
|
||||
run: npm ci
|
||||
- name: setup vault
|
||||
run: node ./e2e/setup.js
|
||||
env:
|
||||
VAULT_HOST: localhost
|
||||
VAULT_PORT: ${{ job.services.vault.ports[8200] }}
|
||||
- name: use vault action
|
||||
uses: ./
|
||||
with:
|
||||
url: http://localhost:${{ job.services.vault.ports[8200] }}
|
||||
token: testtoken
|
||||
secrets: |
|
||||
test secret ;
|
||||
test secret | NAMED_SECRET ;
|
||||
nested/test otherSecret ;
|
||||
- name: verify
|
||||
run: npm run test:e2e=
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, e2e]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js 10.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: npm install
|
||||
run: npm ci
|
||||
- name: release
|
||||
if: success() && endsWith(github.ref, 'master')
|
||||
run: npm run release
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue