Skip to content

setup all in one gitlab ci pipeline#433

Merged
djs0109 merged 28 commits into
masterfrom
425-Problem-of-the-gitlab-pipeline
Jun 23, 2025
Merged

setup all in one gitlab ci pipeline#433
djs0109 merged 28 commits into
masterfrom
425-Problem-of-the-gitlab-pipeline

Conversation

@djs0109
Copy link
Copy Markdown
Collaborator

@djs0109 djs0109 commented Jun 4, 2025

closes #425

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread .github/workflows/unittest.yml Outdated
Comment on lines +154 to +173
- 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
Copy link

Copilot AI Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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)

Copilot uses AI. Check for mistakes.
@djs0109
Copy link
Copy Markdown
Collaborator Author

djs0109 commented Jun 10, 2025

@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

Comment thread .github/workflows/unittest.yml Outdated
run: |
cd $GITHUB_WORKSPACE
ls -la
# Step 10: Navigate back to root folder (already handled by cd $GITHUB_WORKSPACE after docker compose)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the step as not needed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know why some github runners fail. But the error of gitlab runner is probably related to the system update there

@djs0109 djs0109 merged commit b025c85 into master Jun 23, 2025
3 of 6 checks passed
@djs0109 djs0109 deleted the 425-Problem-of-the-gitlab-pipeline branch June 23, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem of the gitlab pipeline

3 participants