Histórico de atividades e importação automática #271
Workflow file for this run
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: front-ci | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: | |
- main | |
- develop | |
types: [opened, synchronize, reopened] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: 📬 Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/node_modules | |
${{ github.workspace }}/dist | |
key: ${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }} | |
restore-keys: | | |
${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}- | |
- name: 🧰 Instala bibliotecas e dependências | |
run: npm i yarn -g && yarn | |
- name: 🔍 Verifica estilização do código | |
run: yarn check-format | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: 📬 Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/node_modules | |
${{ github.workspace }}/dist | |
key: ${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }} | |
restore-keys: | | |
${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}- | |
- name: 🧰 Instala bibliotecas e dependências | |
run: npm i yarn -g && yarn | |
- name: 🧹 Verifica eslint | |
run: yarn check-lint | |
type-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: 📬 Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/node_modules | |
${{ github.workspace }}/dist | |
key: ${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }} | |
restore-keys: | | |
${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}- | |
- name: 🧰 Instala bibliotecas e dependências | |
run: npm i yarn -g && yarn | |
- name: 🔧 Valida tipagens | |
run: yarn check-types | |
test: | |
runs-on: ubuntu-latest | |
env: | |
VITE_USER_SERVICE_URL: ${{ secrets.VITE_USER_SERVICE_URL }} | |
VITE_ROLE_SERVICE_URL: ${{ secrets.VITE_ROLE_SERVICE_URL }} | |
VITE_UNIT_SERVICE_URL: ${{ secrets.VITE_UNIT_SERVICE_URL }} | |
VITE_PROCESS_MANAGEMENT_SERVICE_URL: ${{ secrets.VITE_PROCESS_MANAGEMENT_SERVICE_URL }} | |
VITE_NOTE_SERVICE_URL: ${{ secrets.VITE_NOTE_SERVICE_URL }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: 📬 Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/node_modules | |
${{ github.workspace }}/dist | |
key: ${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }} | |
restore-keys: | | |
${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}- | |
- name: 🧰 Instala bibliotecas e dependências | |
run: npm i yarn -g && yarn | |
- name: 🧪 Roda suíte de testes | |
run: yarn test | |
build: | |
needs: [format, lint, type-check] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: 📬 Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/node_modules | |
${{ github.workspace }}/dist | |
key: ${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }} | |
restore-keys: | | |
${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}- | |
- name: 🧰 Instala bibliotecas e dependências | |
run: npm i yarn -g && yarn | |
- name: 📦 Builda o projeto | |
run: yarn build | |
sonarcloud: | |
name: sonarcloud | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
env: | |
VITE_USER_SERVICE_URL: ${{ secrets.VITE_USER_SERVICE_URL }} | |
VITE_ROLE_SERVICE_URL: ${{ secrets.VITE_ROLE_SERVICE_URL }} | |
VITE_UNIT_SERVICE_URL: ${{ secrets.VITE_UNIT_SERVICE_URL }} | |
VITE_PROCESS_MANAGEMENT_SERVICE_URL: ${{ secrets.VITE_PROCESS_MANAGEMENT_SERVICE_URL }} | |
VITE_NOTE_SERVICE_URL: ${{ secrets.VITE_NOTE_SERVICE_URL }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 📬 Caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/node_modules | |
${{ github.workspace }}/dist | |
key: ${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }} | |
restore-keys: | | |
${{ runner.os }}-vite-${{ hashFiles('**/yarn.lock') }}- | |
- name: 🧰 Instala bibliotecas e dependências | |
run: npm i -g yarn && yarn | |
- name: 📜 Relatório do eslint | |
run: npx eslint -f json -o reports/eslint-report.json src || true | |
- name: 🧪 Testes e cobertura | |
run: VITEST_REPORTERS=vitest-sonar-reporter yarn test --coverage | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |