From 31b30d63fdeddfe1991738153b6b0dc4ede2fe7e Mon Sep 17 00:00:00 2001 From: Clara Ribeiro Date: Fri, 6 Dec 2024 11:15:21 -0300 Subject: [PATCH] fix: ci testes --- .github/workflows/ci.yml | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aee2bb9..9f2a5ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,40 +64,40 @@ jobs: - name: 🧹 Verifica eslint run: npm run lint - # test: - # runs-on: ubuntu-latest - # env: - # MONGO_URI: ${{ secrets.MONGO_URI }} - # MONGO_INITDB_ROOT_USERNAME: ${{ secrets.MONGO_INITDB_ROOT_USERNAME }} - # MONGO_INITDB_ROOT_PASSWORD: ${{ secrets.MONGO_INITDB_ROOT_PASSWORD }} - # DB_HOST: ${{ secrets.DB_HOST }} - # PORT: ${{ secrets.PORT }} - # EMAIL: ${{ secrets.EMAIL }} - # SECRET: ${{ secrets.SECRET }} - # steps: - # - name: Checkout code - # uses: actions/checkout@v3 - - # - name: Use Node.js 20.x - # uses: actions/setup-node@v3 - # with: - # node-version: 20.x - - # - name: 📬 Caching - # uses: actions/cache@v3 - # with: - # path: | - # ${{ github.workspace }}/node_modules - # ${{ github.workspace }}/dist - # key: ${{ runner.os }}-jest-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('/.{js,jsx,ts,tsx}') }} - # restore-keys: | - # ${{ runner.os }}-jest-${{ hashFiles('**/package-lock.json') }}- - - # - name: 🧰 Instala bibliotecas e dependências - # run: npm i - - # - name: 🧪 Roda suíte de testes - # run: npm test + test: + runs-on: ubuntu-latest + env: + MONGO_URI: ${{ secrets.MONGO_URI }} + MONGO_INITDB_ROOT_USERNAME: ${{ secrets.MONGO_INITDB_ROOT_USERNAME }} + MONGO_INITDB_ROOT_PASSWORD: ${{ secrets.MONGO_INITDB_ROOT_PASSWORD }} + DB_HOST: ${{ secrets.DB_HOST }} + PORT: ${{ secrets.PORT }} + EMAIL: ${{ secrets.EMAIL }} + SECRET: ${{ secrets.SECRET }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Use Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: 20.x + + - name: 📬 Caching + uses: actions/cache@v3 + with: + path: | + ${{ github.workspace }}/node_modules + ${{ github.workspace }}/dist + key: ${{ runner.os }}-jest-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('/.{js,jsx,ts,tsx}') }} + restore-keys: | + ${{ runner.os }}-jest-${{ hashFiles('**/package-lock.json') }}- + + - name: 🧰 Instala bibliotecas e dependências + run: npm i + + - name: 🧪 Roda suíte de testes + run: npm test sonarcloud: name: sonarcloud