Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Bump @types/node from 18.19.15 to 20.11.17 in /backend #157

Bump @types/node from 18.19.15 to 20.11.17 in /backend

Bump @types/node from 18.19.15 to 20.11.17 in /backend #157

Workflow file for this run

name: CI
on:
- push
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: Terraform Format
run: terraform fmt -check
working-directory: terraform
- name: Terraform Init
run: terraform init -lock-timeout=900s
working-directory: terraform
env:
TF_IN_AUTOMATION: true
TF_WORKSPACE: main
TF_VAR_app_id: ${{ secrets.TF_VAR_APP_ID }}
TF_VAR_client_secret: ${{ secrets.ARM_CLIENT_SECRET }}
TF_VAR_tenant_id: ${{ secrets.ARM_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
- name: Terraform Validate
run: terraform validate -no-color
working-directory: terraform
env:
TF_IN_AUTOMATION: true
TF_WORKSPACE: main
TF_VAR_app_id: ${{ secrets.TF_VAR_APP_ID }}
TF_VAR_client_secret: ${{ secrets.ARM_CLIENT_SECRET }}
TF_VAR_tenant_id: ${{ secrets.ARM_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
- name: Terraform Plan
run: terraform plan -no-color -input=false -lock-timeout=900s
working-directory: terraform
env:
TF_IN_AUTOMATION: true
TF_WORKSPACE: main
TF_VAR_app_id: ${{ secrets.TF_VAR_APP_ID }}
TF_VAR_client_secret: ${{ secrets.ARM_CLIENT_SECRET }}
TF_VAR_tenant_id: ${{ secrets.ARM_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache dependencies
id: cache-dependencies-frontend
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ hashFiles('frontend/package.json') }}
path: |
frontend/node_modules
~/.npm
- name: Install dependencies
if: ${{ steps.cache-dependencies-frontend.outputs.cache-hit == false }}
run: npm i --legacy-peer-deps
working-directory: frontend
- name: Run tests
run: npm test
working-directory: frontend
- name: Save coverage report
uses: actions/upload-artifact@v3
with:
name: frontend-coverage
path: frontend/coverage/
scan:
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Restore coverage report
uses: actions/download-artifact@v3
with:
name: frontend-coverage
path: frontend/coverage/
- name: Run SonarCloud scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache dependencies
id: cache-dependencies-frontend
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ hashFiles('frontend/package.json') }}
path: |
frontend/node_modules
~/.npm
- name: Install dependencies
if: ${{ steps.cache-dependencies-frontend.outputs.cache-hit == false }}
run: npm i --legacy-peer-deps
working-directory: frontend
- name: Build the app
run: npm run build
working-directory: frontend
env:
REACT_APP_MIXPANEL_TOKEN: ${{ secrets.REACT_APP_MIXPANEL_TOKEN }}
REACT_APP_SENTRY_DSN: ${{ secrets.REACT_APP_SENTRY_DSN }}
build-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache dependencies
id: cache-dependencies-backend
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ hashFiles('backend/package.json') }}
path: |
backend/node_modules
~/.npm
- name: Install dependencies
if: ${{ steps.cache-dependencies-backend.outputs.cache-hit == false }}
run: npm i --legacy-peer-deps
working-directory: backend
- name: Build the app
run: npm run build
working-directory: backend