Skip to content

Feat/endpoints stats #7

Feat/endpoints stats

Feat/endpoints stats #7

Workflow file for this run

name: CI/CD — NexaCloud API
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# ── Job 1 : Qualité ────────────────────────────────────────────────
qualite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -r ressources/requirements.txt
- name: Lint
run: flake8 ressources/ --config ressources/.flake8
- name: Tests
run: pytest ressources/ -v --cov=ressources
# ── Job 2 : Staging ───────────────────────────────────────────────
staging:
runs-on: ubuntu-latest
needs: qualite # attend que le job qualite réussisse
environment: staging
if: github.ref_name == 'main' # uniquement sur la branche main
steps:
- uses: actions/checkout@v4
- name: "Run Azure webapp deploy action using publish profile credentials"
uses: azure/webapps-deploy@v3
with:
app-name: "DevAppAdrien"
publish-profile: ${{ secrets.azureWebAppPublishProfile }}
package: ressources/
# ── Job 3 : Production ────────────────────────────────────────────
production:
runs-on: ubuntu-latest
needs: staging
environment: production
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
- name: "Run Azure webapp deploy action using publish profile credentials"
uses: azure/webapps-deploy@v3
with:
app-name: "DevAppAdrien"
publish-profile: ${{ secrets.azureWebAppPublishProfile }}
package: ressources/