Skip to content

Commit

Permalink
Merge pull request #794 from sitkoru/fix-vault-tests
Browse files Browse the repository at this point in the history
fix(ci): try to run vault in docker
  • Loading branch information
SonicGD authored Mar 20, 2023
2 parents 72b3d8b + deb36ad commit 079a0f8
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,25 +163,20 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/sitkoru/actions-container
env:
VAULT__URI: http://127.0.0.1:8200
VAULT__URI: http://vault:8200
VAULT__TOKEN: twit3itPSAD0yok
VAULT__MOUNTPOINT: secret
VAULT__SECRETS__0: tests
VAULT__SECRETS__1: test2
services:
sonyflake:
image: titpetric/sonyflake
vault:
image: vault
env:
VAULT_DEV_ROOT_TOKEN_ID: twit3itPSAD0yok
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
options: --cap-add=IPC_LOCK
steps:
- uses: actions/checkout@v3
- name: Install Vault
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add -
apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
apt-get update && apt-get install -y vault
setcap cap_ipc_lock= /usr/bin/vault
- name: Start Vault
run: |
vault server -dev -dev-root-token-id="${VAULT__TOKEN}" &
- name: Run tests
run: dotnet test --logger GitHubActions tests/Sitko.Core.Configuration.Vault.Tests/Sitko.Core.Configuration.Vault.Tests.csproj

Expand Down

0 comments on commit 079a0f8

Please sign in to comment.