Skip to content

Commit d11fa3f

Browse files
committed
Add unit test
1 parent ac069d7 commit d11fa3f

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

.github/workflows/pull_request.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.actor != 'dependabot[bot]'
1515
runs-on: ubuntu-latest
1616
outputs:
17-
python-template-docker-tag: ${{ steps.python-template-docker-tag.outputs.python-template-docker-tag }}
17+
docker-tag: ${{ steps.docker-tag.outputs.docker-tag }}
1818
env:
1919
PYTHON_APP_ENVIRONMENT: development
2020
steps:
@@ -53,36 +53,36 @@ jobs:
5353
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
5454

5555
- name: Set docker tag
56-
id: python-template-docker-tag
57-
run: echo "python-template-docker-tag=myregistry/python-template:${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
56+
id: docker-tag
57+
run: echo "docker-tag=myregistry/python-template:${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
5858

5959
- name: Build and push
6060
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
6161
with:
6262
file: src/python_template/api/Dockerfile
63-
tags: ${{ steps.python-template-docker-tag.outputs.python-template-docker-tag }}
63+
tags: ${{ steps.docker-tag.outputs.docker-tag }}
6464
push: false
6565

6666
deploy-dev:
6767
needs: continuous-integration
6868
uses: ./.github/workflows/_deploy.yaml
6969
with:
7070
environment: dev
71-
docker_tag: ${{ needs.continuous-integration.outputs.python-template-docker-tag }}
71+
docker_tag: ${{ needs.continuous-integration.outputs.docker-tag }}
7272
secrets: inherit
7373

7474
deploy-stg:
7575
needs: [continuous-integration, deploy-dev]
7676
uses: ./.github/workflows/_deploy.yaml
7777
with:
7878
environment: stg
79-
docker_tag: ${{ needs.continuous-integration.outputs.python-template-docker-tag }}
79+
docker_tag: ${{ needs.continuous-integration.outputs.docker-tag }}
8080
secrets: inherit
8181

8282
deploy-pro:
8383
needs: [continuous-integration, deploy-stg]
8484
uses: ./.github/workflows/_deploy.yaml
8585
with:
8686
environment: pro
87-
docker_tag: ${{ needs.continuous-integration.outputs.python-template-docker-tag }}
87+
docker_tag: ${{ needs.continuous-integration.outputs.docker-tag }}
8888
secrets: inherit

tests/unit/domain/__init__.py

Whitespace-only changes.

tests/unit/domain/entities/__init__.py

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from decimal import Decimal
2+
3+
from python_template.domain.entities.product import Product
4+
5+
6+
class TestProduct:
7+
def test_publish_product(self) -> None:
8+
Product(name="Product name", price=Decimal("1.0"), is_discontinued=False)

0 commit comments

Comments
 (0)