Add quality gate workflow 2.
This commit is contained in:
committed by
vitor-aignosi
parent
fb685252e7
commit
0f0a69f4d8
32
.github/workflows/quality-gate.yml
vendored
32
.github/workflows/quality-gate.yml
vendored
@@ -20,6 +20,22 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: 🔧 Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
@@ -30,26 +46,14 @@ jobs:
|
|||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements_https.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ 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
|
- name: 📦 Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements_https.txt
|
||||||
pip install pytest pytest-cov
|
pip install pytest pytest-cov
|
||||||
|
|
||||||
- name: ⬇️ Setup Node.js 18
|
- name: ⬇️ Setup Node.js 18
|
||||||
|
|||||||
Reference in New Issue
Block a user