Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement/coveralls #37

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 5 additions & 38 deletions .github/workflows/main_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,44 +51,11 @@ jobs:
- name: Install the project dependencies
run: poetry install
- name: Run the automated tests (ignore deprecation errors )
run: poetry run pytest -W ignore::DeprecationWarning --cov-report xml --cov=yotse tests/
run: poetry run pytest -W ignore::DeprecationWarning --cov-report lcov --cov=yotse tests/
- name: Run the examples (except nlblueprint)
run: poetry run examples

# the following is coverage stuff that should only run on pull requests
- name: Debug environment
run: |
env
pwd
- name: List directory contents
run: |
ls -al
- name: Get Coverage
if: github.event_name == 'pull_request' && matrix.task == 'run-tests'
uses: orgoro/coverage@v3.1
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
- name: Coverage Badge
if: github.event_name == 'pull_request' && matrix.task == 'run-tests'
uses: tj-actions/coverage-badge-py@v2
- name: Verify Changed files
if: github.event_name == 'pull_request' && matrix.task == 'run-tests'
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: coverage.svg
- name: Commit files
if: github.event_name == 'pull_request' && steps.verify-changed-files.outputs.files_changed == 'true' && matrix.task == 'run-tests'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: github.event_name == 'pull_request' && steps.verify-changed-files.outputs.files_changed == 'true' && matrix.task == 'run-tests'
uses: ad-m/github-push-action@master
- name: Upload results to Coveralls (only on Python3.10 job)
if: matrix.python-version == '3.10'
uses: coverallsapp/github-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
force: true
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Python Version](https://img.shields.io/badge/Python-3.9%20%E2%86%92%203.12-blue)
![CI/CD](https://github.com/SURFQuantum/yotse/actions/workflows/main_pipeline.yml/badge.svg)
![Integration](https://github.com/SURFQuantum/yotse/actions/workflows/integration.yml/badge.svg)
![Coverage](https://github.com/SURFQuantum/yotse/blob/main/coverage.svg?raw=1)
[![Coverage](https://coveralls.io/repos/github/SURFQuantum/yotse/badge.svg?branch=main)](https://coveralls.io/github/SURFQuantum/yotse?branch=main)
![docs: numpy](https://img.shields.io/badge/docstyle-numpy-green)

# YOTSE - Your Optimization Tool for Scientific Experiments
Expand Down
21 changes: 0 additions & 21 deletions coverage.svg

This file was deleted.