setup all in one gitlab ci pipeline#433
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR aims to set up an all-in-one GitLab CI pipeline while updating the GitHub Actions workflow for unit testing and coverage reporting. Key changes include updates to CI variables and includes in .gitlab-ci.yml, and modifications to the GitHub Actions workflow to add a coverage job alongside standard tests, including an updated checkout action and new deployment steps for the coverage badge.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .gitlab-ci.yml | Updated CI variables and adjusted include sections to support the new FIWARE tests coverage template |
| .github/workflows/unittest.yml | Updated the workflow to include a coverage job in the matrix, updated actions/checkout to v4, and added steps for generating and deploying the coverage badge |
Comments suppressed due to low confidence (1)
.gitlab-ci.yml:10
- [nitpick] If EXCLUDE_PYTHON is deprecated or intended for future use, consider either fully removing this commented line or adding a comment explaining its purpose to keep the file clean and well documented.
# EXCLUDE_PYTHON: 37, 38, 39, 310, 311
| - name: Deploy coverage badge to gh-pages | ||
| if: matrix.run_coverage && github.ref == 'refs/heads/425-Problem-of-the-gitlab-pipeline' # Only for the coverage job on main branch | ||
| uses: peaceiris/actions-gh-pages@v4 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_branch: gh-pages | ||
| # Create the necessary directory structure for the publish_dir | ||
| # The content of 'badge_publish_dir' will be deployed to the root of 'gh-pages' | ||
| # So we prepare 'badge_publish_dir/docs/master/coverage/badge.svg' | ||
| publish_dir: ./badge_publish_dir | ||
| # Keep other files on gh-pages branch | ||
| keep_files: true | ||
| user_name: 'github-actions[bot]' | ||
| user_email: 'github-actions[bot]@users.noreply.github.com' | ||
| commit_message: 'docs: Update coverage badge [CI]' | ||
| env: # Env variables for the step itself | ||
| # Prepare the directory for publishing the badge | ||
| SETUP_SCRIPT: | | ||
| mkdir -p ./badge_publish_dir/docs/master/coverage | ||
| mv coverage_badge.svg ./badge_publish_dir/docs/master/coverage/badge.svg |
There was a problem hiding this comment.
There are two sets of steps for deploying the coverage badge. Consider removing the first, redundant block (lines 154-167) if it is no longer needed, to avoid confusion and improve maintainability.
| - name: Deploy coverage badge to gh-pages | |
| if: matrix.run_coverage && github.ref == 'refs/heads/425-Problem-of-the-gitlab-pipeline' # Only for the coverage job on main branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| # Create the necessary directory structure for the publish_dir | |
| # The content of 'badge_publish_dir' will be deployed to the root of 'gh-pages' | |
| # So we prepare 'badge_publish_dir/docs/master/coverage/badge.svg' | |
| publish_dir: ./badge_publish_dir | |
| # Keep other files on gh-pages branch | |
| keep_files: true | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' | |
| commit_message: 'docs: Update coverage badge [CI]' | |
| env: # Env variables for the step itself | |
| # Prepare the directory for publishing the badge | |
| SETUP_SCRIPT: | | |
| mkdir -p ./badge_publish_dir/docs/master/coverage | |
| mv coverage_badge.svg ./badge_publish_dir/docs/master/coverage/badge.svg | |
| # (Block removed entirely) |
|
@sbanoeon I just made a few updates to test the functionality. It seems to work: https://github.com/RWTH-EBC/FiLiP/tree/gh-pages/docs/master/coverage You can review the branch now |
| run: | | ||
| cd $GITHUB_WORKSPACE | ||
| ls -la | ||
| # Step 10: Navigate back to root folder (already handled by cd $GITHUB_WORKSPACE after docker compose) |
There was a problem hiding this comment.
Delete the step as not needed
There was a problem hiding this comment.
I dont know why some github runners fail. But the error of gitlab runner is probably related to the system update there
closes #425