Skip to content

Commit

Permalink
testing pytest and documentation workflows on k3s runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharath.Vutpala committed Jun 4, 2024
1 parent 7b9c8ba commit e958dc1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 50 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/generate-and-submit-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,5 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: touch a file
run: |
cd /home/runner/_work/claasp
touch test.txt
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: test-artifact
path: /home/runner/_work/claasp/test.txt

- name: test dind
run: sleep 600

# - name: Generate documentation
# run: make doc
- name: Generate documentation
run: make doc
68 changes: 34 additions & 34 deletions .github/workflows/run-pytest-and-sonarcloud-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,42 +35,42 @@ jobs:
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
# echo running pytest for claasp
# make remote-pytest
- name: Run remote-pytest
run: |
cd /home/runner/_work/claasp
echo running pytest for 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
- 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@v2
# with:
# persist-credentials: false
# fetch-depth: 0
run-code-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0

# - name: Download Latest Coverage.xml from Artifacts
# uses: actions/download-artifact@v2
# with:
# name: coverage-report
- 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: 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
- 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

0 comments on commit e958dc1

Please sign in to comment.