Add quality gate workflow 11.
This commit is contained in:
20
.github/workflows/quality-gate.yml
vendored
20
.github/workflows/quality-gate.yml
vendored
@@ -30,19 +30,11 @@ jobs:
|
|||||||
owner: 'Aignosi'
|
owner: 'Aignosi'
|
||||||
repositories: 'sientia-dataops-library,sientia-mlops-library'
|
repositories: 'sientia-dataops-library,sientia-mlops-library'
|
||||||
|
|
||||||
- name: Configure Git credentials
|
- name: Create temporary requirements file
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
run: |
|
run: |
|
||||||
git config --global credential.helper store
|
sed "s|git+ssh://git@github.com|git+https://${GITHUB_TOKEN}@github.com|g" requirements.txt > requirements_https.txt
|
||||||
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
|
|
||||||
|
|
||||||
- name: 🔧 Setup Python
|
- name: 🔧 Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
@@ -53,14 +45,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: 📦 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
|
||||||
@@ -73,7 +65,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 🧪 Run Tests with Pytest
|
- name: 🧪 Run Tests with Pytest
|
||||||
run: |
|
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
|
- name: 📊 Run SonarQube Analysis
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user