Skip to content

Testing with login #1020

Testing with login

Testing with login #1020

# name: Run pytest and SonarCloud Scan
# on:
# push:
# branches:
# - '**'
# pull_request:
# types: [opened, synchronize, reopened, edited]
# branches:
# - develop
# - main
# concurrency:
# group: run-pytest-tests_${{ github.ref }}
# cancel-in-progress: true
# jobs:
# run-pytest:
# runs-on: self-hosted
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# persist-credentials: false
# fetch-depth: 0
# - name: Fix Directory Structure
# run: |
# mkdir /home/runner/_work/claasp_backup
# mv -f /home/runner/_work/claasp/claasp/* /home/runner/_work/claasp_backup
# rm -rf /home/runner/_work/claasp/
# mkdir /home/runner/_work/claasp
# mv -f /home/runner/_work/claasp_backup/* /home/runner/_work/claasp
# chmod g+w /home/runner/_work/claasp/ -R
# rm -rf /home/runner/_work/claasp_backup
# - name: Run remote-pytest
# run: |
# cd /home/runner/_work/claasp
# make remote-pytest
# - name: Upload Coverage.xml to artifacts
# uses: actions/upload-artifact@v2
# with:
# name: coverage-report
# path: /home/runner/_work/claasp/coverage.xml
# run-code-coverage:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# persist-credentials: false
# fetch-depth: 0
# - name: Download Latest Coverage.xml from Artifacts
# uses: actions/download-artifact@v2
# with:
# name: coverage-report
# - name: Override Coverage Source Path for Sonar
# run: sed -i "s/<source>\/home\/runner\/_work\/claasp\/claasp<\/source>/<source>\/github\/workspace\/claasp<\/source>/g" coverage.xml
# - name: SonarCloud Scan
# uses: sonarsource/sonarcloud-github-action@master
# with:
# args: >
# -Dsonar.branch.name=${{ env.GITHUB_HEAD_REF }}
# -Dsonar.python.coverage.reportPaths=coverage.xml
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# needs: run-pytest