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

Merge pull request #165 from Grupo-G03-4SOAT-FIAP/feature/57/cd #390

Merge pull request #165 from Grupo-G03-4SOAT-FIAP/feature/57/cd

Merge pull request #165 from Grupo-G03-4SOAT-FIAP/feature/57/cd #390

Workflow file for this run

name: Standard
on:
push:
branches:
- main
- develop
- 'feature/**'
- 'fix/**'
paths-ignore:
- '**/*.md'
- .scafflater/**
- docs/**
pull_request:
branches:
- main
- develop
paths-ignore:
- '**/*.md'
- .scafflater/**
- docs/**
jobs:
ci:
name: CI
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: pgpwd
POSTGRES_USER: pguser
POSTGRES_DB: rms
POSTGRES_HOST: localhost
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Node Cache
uses: actions/cache@v2
id: cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run test:cov
- name: Sonar Analysis
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# ci_docker:
# name: CI - Docker
# steps:
# - name: Docker Build and Push
# cd:
# name: CD
# if: ${{ success() && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
# needs: [ci, ci_docker]
# steps:
# - name: Deploy Infra
# - name: Deploy App