Update README.md #48
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
name: ci-angular-workflow-dev | |
# Especifica quando o fluxo de trabalho deve ser executado | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
types: [opened, synchronize, reopened] | |
# Define as etapas que compõem o fluxo de trabalho | |
jobs: | |
# Nome do trabalho | |
ci-angular-workflow: | |
runs-on: ubuntu-latest | |
# Define as etapas que compõem o trabalho | |
steps: | |
# Clona o repositório com a action já disponível do GitHub Checkout | |
- uses: actions/checkout@v3 | |
# Instala o Node.js | |
- name: Using Node.js | |
uses: actions/setup-node@v2 | |
# Passando argumentos para a action | |
with: | |
node-version: "20.x" # Altere para a versão do Node.js que seu projeto utiliza | |
# Rodando a action manualmente | |
- name: run install, build | |
# Rodando os comandos npm install, npm run build e npm run test | |
run: | | |
npm install | |
npm run build | |
- name: run tests and coverage | |
# Rodando o comando npm run test | |
run: npm run test:prod | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |