From deb36ad23c7403054366218e98d47a44f6740890 Mon Sep 17 00:00:00 2001 From: George Drak Date: Mon, 20 Mar 2023 11:38:35 +0500 Subject: [PATCH] fix(ci): try to run vault in docker --- .github/workflows/main.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29846f1ea..7907d2b60 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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