-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06625e6
commit b015e24
Showing
1 changed file
with
16 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
name: Python Package using Poetry | ||
name: CI | ||
|
||
on: | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
docker: | ||
image: docker:stable-dind | ||
|
||
steps: | ||
- name: Copia os arquivos | ||
uses: actions/checkout@v3.3.0 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Instalar Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Build and run Docker containers | ||
run: | | ||
docker-compose up --build -d # Subindo os containers em segundo plano | ||
docker-compose run app sh -c "pytest" # Executando os testes | ||
- name: Instalar poetry | ||
run: pip install poetry | ||
- name: Stop Docker containers | ||
run: docker-compose down # Parando os containers após os testes |