diff --git a/.github/workflows/quality-gate.yml b/.github/workflows/quality-gate.yml index 1086656..9164b3d 100644 --- a/.github/workflows/quality-gate.yml +++ b/.github/workflows/quality-gate.yml @@ -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: