Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat(e2e): added gh action for execution of integration tests on PR and release
Akhil Mohanb24d748462e5
diff --git a/.github/workflows/run-backend-tests.yml b/.github/workflows/run-backend-tests.ymlnew file mode 100644index 0000000000..41870efb53--- /dev/null+++ b/.github/workflows/run-backend-tests.yml@@ -0,0 +1,47 @@+name: "Run backend tests"++on:+ pull_request:+ types: [opened, synchronize]+ paths:+ - "backend/**"+ - "!backend/README.md"+ - "!backend/.*"+ - "backend/.eslintrc.js"+ push:+ tags:+ - "infisical/v*.*.*-postgres"+jobs:+ check-be-pr:+ name: Run integration test+ runs-on: ubuntu-latest+ timeout-minutes: 15+ steps:+ - name: ☁️ Checkout source+ uses: actions/checkout@v3+ - uses: KengoTODA/actions-setup-docker-compose@v1+ if: ${{ env.ACT }}+ name: Install `docker-compose` for local simulations+ with:+ version: "2.14.2"+ - name: 🔧 Setup Node 20+ uses: actions/setup-node@v3+ with:+ node-version: "20"+ cache: "npm"+ cache-dependency-path: backend/package-lock.json+ - name: Install dependencies+ run: npm install+ working-directory: backend+ - name: Start postgres and redis+ run: touch .env && docker-compose -f docker-compose.pg.yml up -d db redis+ - name: Start integration test+ run: npm run test:e2e+ working-directory: backend+ env:+ REDIS_URL: redis://172.17.0.1:6379+ DB_CONNECTION_URI: postgres://infisical:[email protected]:5432/infisical?sslmode=disable+ AUTH_SECRET: something-random+ - name: cleanup+ run: |+ docker-compose -f "docker-compose.pg.yml" downdiff --git a/backend/src/server/app.ts b/backend/src/server/app.tsindex ca6b9003a1..969d2fe43d 100644--- a/backend/src/server/app.ts+++ b/backend/src/server/app.ts@@ -37,7 +37,7 @@ type TMain = {export const main = async ({ db, smtp, logger, queue }: TMain) => {const appCfg = getConfig();const server = fasitfy({- logger,+ logger: appCfg.NODE_ENV === "test" ? false : logger,trustProxy: true,connectionTimeout: 30 * 1000,ignoreTrailingSlash: true