Skip to content

Commit

Permalink
adding pytest to .ymal
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaLeylavergne committed Mar 5, 2024
1 parent 0d09e07 commit 93d763f
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/main_deploydef.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@ jobs:
run: pip install -r requirements.txt

# Optional: Add step to run tests here (PyTest, Django test suites, etc.)
# Etape pour exécuter les tests unitaires
- name: Run unit tests
run: |
source venv/bin/activate
pytest
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Zip artifact for deployment
run: zip release.zip ./* -r

Expand All @@ -49,8 +59,8 @@ jobs:
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
permissions:
id-token: write #This is required for requesting the JWT

steps:
- name: Download artifact from build job
Expand All @@ -61,13 +71,13 @@ jobs:
- name: Unzip artifact for deployment
run: unzip release.zip


- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_28635AED5CAF41179D430234597098DA }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_80B70F2ABA9F44169804C2CB6DDBE999 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_5451B7A2842C414E868A46EDFD3569F9 }}

- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_28635AED5CAF41179D430234597098DA }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_80B70F2ABA9F44169804C2CB6DDBE999 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_5451B7A2842C414E868A46EDFD3569F9 }}

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v2
Expand Down

0 comments on commit 93d763f

Please sign in to comment.