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

ci: Melhorias no CD #398

ci: Melhorias no CD

ci: Melhorias no CD #398

Workflow file for this run

name: Standard
on:
push:
branches:
- 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 }}