-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Infisical/infisical
- Loading branch information
Showing
71 changed files
with
2,608 additions
and
1,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
# Keys | ||
# Required keys for platform encryption/decryption ops | ||
PRIVATE_KEY=replace_with_nacl_sk | ||
PUBLIC_KEY=replace_with_nacl_pk | ||
# Required key for platform encryption/decryption ops | ||
ENCRYPTION_KEY=replace_with_lengthy_secure_hex | ||
|
||
# JWT | ||
# Required secrets to sign JWT tokens | ||
JWT_SIGNUP_SECRET=replace_with_lengthy_secure_hex | ||
JWT_REFRESH_SECRET=replace_with_lengthy_secure_hex | ||
JWT_AUTH_SECRET=replace_with_lengthy_secure_hex | ||
JWT_SERVICE_SECRET=replace_with_lengthy_secure_hex | ||
|
||
# JWT lifetime | ||
# Optional lifetimes for JWT tokens expressed in seconds or a string | ||
# describing a time span (e.g. 60, "2 days", "10h", "7d") | ||
JWT_AUTH_LIFETIME= | ||
JWT_REFRESH_LIFETIME= | ||
JWT_SERVICE_SECRET= | ||
JWT_SIGNUP_LIFETIME= | ||
|
||
# Optional lifetimes for OTP expressed in seconds | ||
|
@@ -33,26 +31,31 @@ MONGO_PASSWORD=example | |
|
||
# Website URL | ||
# Required | ||
|
||
SITE_URL=http://localhost:8080 | ||
|
||
# Mail/SMTP | ||
# Required to send emails | ||
# By default, SMTP_HOST is set to smtp.gmail.com | ||
# By default, SMTP_HOST is set to smtp.gmail.com, SMTP_PORT is set to 587, SMTP_TLS is set to false, and SMTP_FROM_NAME is set to Infisical | ||
SMTP_HOST=smtp.gmail.com | ||
# If STARTTLS is supported, the connection will be upgraded to TLS when SMTP_SECURE is set to false | ||
SMTP_SECURE=false | ||
SMTP_PORT=587 | ||
SMTP_NAME=Team | ||
SMTP_USERNAME=[email protected] | ||
SMTP_USERNAME= | ||
SMTP_PASSWORD= | ||
SMTP_FROM_ADDRESS= | ||
SMTP_FROM_NAME=Infisical | ||
|
||
# Integration | ||
# Optional only if integration is used | ||
CLIENT_ID_HEROKU= | ||
CLIENT_ID_VERCEL= | ||
CLIENT_ID_NETLIFY= | ||
CLIENT_ID_GITHUB= | ||
CLIENT_SECRET_HEROKU= | ||
CLIENT_SECRET_VERCEL= | ||
CLIENT_SECRET_NETLIFY= | ||
CLIENT_SECRET_GITHUB= | ||
CLIENT_SLUG_VERCEL= | ||
|
||
# Sentry (optional) for monitoring errors | ||
SENTRY_DSN= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "Backend Test Report" | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Check Backend Pull Request"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
be-report: | ||
name: Backend test report | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 📁 Download test results | ||
id: download-artifact | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
name: be-test-results | ||
path: backend | ||
workflow: check-be-pull-request.yml | ||
workflow_conclusion: success | ||
- name: 📋 Publish test results | ||
uses: dorny/test-reporter@v1 | ||
with: | ||
name: Test Results | ||
path: reports/jest-*.xml | ||
reporter: jest-junit | ||
working-directory: backend | ||
- name: 📋 Publish coverage | ||
uses: ArtiomTr/jest-coverage-report-action@v2 | ||
id: coverage | ||
with: | ||
output: comment, report-markdown | ||
coverage-file: coverage/report.json | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: backend | ||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
message: ${{ steps.coverage.outputs.report }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
name: Check Backend Pull Request | ||
name: "Check Backend Pull Request" | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
types: [opened, synchronize] | ||
paths: | ||
- 'backend/**' | ||
- '!backend/README.md' | ||
- '!backend/.*' | ||
- 'backend/.eslintrc.js' | ||
|
||
- "backend/**" | ||
- "!backend/README.md" | ||
- "!backend/.*" | ||
- "backend/.eslintrc.js" | ||
|
||
jobs: | ||
|
||
check-be-pr: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- | ||
name: ☁️ Checkout source | ||
- name: ☁️ Checkout source | ||
uses: actions/checkout@v3 | ||
- | ||
name: 🔧 Setup Node 16 | ||
- name: 🔧 Setup Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
node-version: "16" | ||
cache: "npm" | ||
cache-dependency-path: backend/package-lock.json | ||
- | ||
name: 📦 Install dependencies | ||
- name: 📦 Install dependencies | ||
run: npm ci --only-production --ignore-scripts | ||
working-directory: backend | ||
# - | ||
# name: 🧪 Run tests | ||
# run: npm run test:ci | ||
# working-directory: backend | ||
- | ||
name: 🏗️ Run build | ||
- name: 🧪 Run tests | ||
run: npm run test:ci | ||
working-directory: backend | ||
- name: 📁 Upload test results | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: be-test-results | ||
path: | | ||
./backend/reports | ||
./backend/coverage | ||
- name: 🏗️ Run build | ||
run: npm run build | ||
working-directory: backend |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,9 @@ node_modules | |
.env | ||
|
||
# testing | ||
/coverage | ||
coverage | ||
reports | ||
junit.xml | ||
|
||
# next.js | ||
/.next/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,7 @@ nfpms: | |
- rpm | ||
- deb | ||
- apk | ||
- archlinux | ||
bindir: /usr/bin | ||
scoop: | ||
bucket: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { server } from '../src/app'; | ||
import { describe, expect, it, beforeAll, afterAll } from '@jest/globals'; | ||
import supertest from 'supertest'; | ||
import { setUpHealthEndpoint } from '../src/services/health'; | ||
|
||
const requestWithSupertest = supertest(server); | ||
describe('Healthcheck endpoint', () => { | ||
beforeAll(async () => { | ||
setUpHealthEndpoint(server); | ||
}); | ||
afterAll(async () => { | ||
server.close(); | ||
}); | ||
|
||
it('GET /healthcheck should return OK', async () => { | ||
const res = await requestWithSupertest.get('/healthcheck'); | ||
expect(res.status).toEqual(200); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.