Add quality gate workflow 11.
This commit is contained in:
committed by
vitor-aignosi
parent
0f753d00cb
commit
79fc605669
20
.github/workflows/quality-gate.yml
vendored
20
.github/workflows/quality-gate.yml
vendored
@@ -30,19 +30,11 @@ jobs:
|
||||
owner: 'Aignosi'
|
||||
repositories: 'sientia-dataops-library,sientia-mlops-library'
|
||||
|
||||
- name: Configure Git credentials
|
||||
- name: Create temporary requirements file
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
run: |
|
||||
git config --global credential.helper store
|
||||
echo "https://${GITHUB_TOKEN}:x-oauth-basic@github.com" > ~/.git-credentials
|
||||
chmod 600 ~/.git-credentials
|
||||
|
||||
# - name: Create temporary requirements file
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
# run: |
|
||||
# sed "s|git+ssh://git@github.com|git+https://${GITHUB_TOKEN}:x-oauth-basic@github.com|g" requirements.txt > requirements_https.txt
|
||||
sed "s|git+ssh://git@github.com|git+https://${GITHUB_TOKEN}@github.com|g" requirements.txt > requirements_https.txt
|
||||
|
||||
- name: 🔧 Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
@@ -53,14 +45,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: 📦 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
|
||||
@@ -73,7 +65,7 @@ jobs:
|
||||
|
||||
- name: 🧪 Run Tests with Pytest
|
||||
run: |
|
||||
pytest tests --junitxml=pytest.xml --cov=scouter --cov-report=xml --cov-report=term
|
||||
pytest tests --junitxml=pytest.xml --cov=scouter requirements--cov-report=xml --cov-report=term
|
||||
|
||||
- name: 📊 Run SonarQube Analysis
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user