Skip to content

Commit

Permalink
ci: try fix error in unit-test action
Browse files Browse the repository at this point in the history
enter in backend file to run docker commands
  • Loading branch information
Pedro0505 committed Aug 18, 2023
1 parent 72e1773 commit bf89191
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/tests-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ jobs:
- name: Verifica o repositório do Git
uses: actions/checkout@v3

- name: Entra no diretorio do backend
run: cd backend

- name: Cria a imagem
run: docker build . -t test-fullstack-api -f Dockerfile.test
run: cd backend && docker build . -t test-fullstack-api -f Dockerfile.test

- name: Sobe o container
run: docker run --name app-api-test test-fullstack-api
run: cd backend && docker run --name app-api-test test-fullstack-api

- name: Executa os testes
run: docker exec -t app-api-test npm run test
run: cd backend && docker exec -t app-api-test npm run test

- name: Derruba o container
if: always()
run: docker rm --force app-api-test
run: cd backend && docker rm --force app-api-test

0 comments on commit bf89191

Please sign in to comment.