Add quality gate workflow 2.

This commit is contained in:
Bruno Domingues
2025-05-14 14:33:24 -03:00
parent e099253070
commit 86b3b55cea

View File

@@ -20,6 +20,22 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate GitHub App token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
# installation_id: ${{ secrets.INSTALLATION_ID }}
- name: Create temporary requirements file
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
# Criar uma versão temporária do requirements.txt com URLs HTTPS
sed 's|git+ssh://git@github.com|git+https://$GITHUB_TOKEN@github.com|g' requirements.txt > requirements_https.txt
cat requirements_https.txt
- name: 🔧 Setup Python
uses: actions/setup-python@v4
@@ -30,26 +46,14 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements_https.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Configure SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY_DATAOPS }}
${{ secrets.SSH_PRIVATE_KEY_MLOPS }}
- name: Add github.com to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: 📦 Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_https.txt
pip install pytest pytest-cov
- name: ⬇️ Setup Node.js 18