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

Workflow improvements and enhancements 🍭 #66

Merged
merged 16 commits into from
Aug 18, 2023

Conversation

mitsuki31
Copy link
Owner

@mitsuki31 mitsuki31 commented Aug 11, 2023

This pull request focuses on refining and enhancing various workflows within the project to streamline processes and improve code quality.

Changes Made

Release Drafter Workflow

  • Enhanced the releases template in the Release Drafter workflow by adding the autolabeler to automatically label pull requests (PRs).
    Updated the autolabeler to apply labels to PRs based on specific conditions:
    • PRs with changes in Python code are labeled lang:python.
    • PRs with changes in Java code are labeled lang:java.
  • Modified and updated the template of release description.
  • Updated title names for new features and enhancements.
  • Added label named deprecate for labeling the deprecated features on PRs (similar with remove).
  • Added a clear description for the workflow.

CodeQL Workflow

  • Restructured the CodeQL workflow to focus on Java code changes only (this means excluding the Python setup and analysis).
  • Modified the branch name from develop to release, ensuring code is thoroughly checked before being pushed to the release branch.
  • Improved the efficiency of the CodeQL workflow by caching installed Maven dependencies.
  • Extended CodeQL analysis to both Ubuntu and Windows platforms for comprehensive code portability checks.
  • Added a clear description for the workflow.

PyLint Workflow

  • Streamlined the PyLint workflow by focusing on Python versions 3.7 and the latest.
  • Implemented caching for installed dependencies to speed up workflow execution.
  • Expanded the workflow to run on both Ubuntu and Windows platforms.
  • Added a clear description for the workflow.

VirusTotal Scan Workflow

  • Renamed the workflow name to VirusTotal Scan.
  • Added a clear description for the workflow.

Dependabot Workflow

  • Configured the package ecosystem for Maven in the Dependabot workflow to ensure accurate dependency management.
  • Added a clear description for the workflow.

Project Tester Workflow

  • Introduced a new workflow named Project Tester (tests.yml).
  • This workflow designed to run on 3 conditions:
    • Push (only run when the specified files are changed)
      # Only run when the specific files are changed
      paths:
      - 'src/**/*.java' # Java files
      - 'src/**/*.py' # Python files
    • Pull Request (always run)
    • Run manually
  • The workflow aim to enhance project testing, packaging, and documentation processes while allowing for debugging when needed.
  • Provided debug option on workflow_dispatch (run manually).
    # The workflow also can be triggered manually, and choose whether
    # to run with or without debug mode
    workflow_dispatch:
    inputs:
    debug:
    description: 'Debug Mode'
    required: false
    type: boolean
All Commits
  • 2b52d27 - Update the releases template
  • 1cc7941 - Minor changes on categories filter
  • 667e1bf - Update the autolabeler
  • f0847b0 - Configure the package ecosystem for Maven
  • 818980c - Enhance the codeql workflow
  • 912097b - Several improvements to pylint workflow
  • 9a0884b - Revamped codeql workflow and caching
  • 2aff0a8 - Update the virus-scan.yml
  • 9774a1f - Add clear description for all workflows
  • be91b08 - Add new workflow named tests
  • 315f568 - Improve the testing workflow
  • d9ee513 - Improve the CodeQL workflow

Description

This pull request encompasses a series of workflow enhancements aimed at improving code quality, workflow efficiency, and overall project stability. These changes optimize the release process, streamline code analysis, and emphasize the use of Java for public APIs to ensure robustness, portability, and security.

Summary

Enhancements and refinements have been made to various workflows, such as Release Drafter, CodeQL, VirusTotal Scan, and other workflows to bolster the project's development processes and ensure code quality and security.

* Added the `autolabeler` for auto labeling PRs
* Update and change the description template
* Changed the label name: `deprecated` -> `deprecate`
* Changed the title name for new features and enhancements
This change updated the autolabeler to labeling PRs on the following conditions:
  - Some changes on Python code -- `lang:python`
  - Some changes on Java code   -- `lang:java`
* Now the `codeql` will only checks if the following statements are true:
  - Changed files are inside `src` directory
  - Changed files are type of Java or Python files

* Changed the `develop` -> `release` branch
  We should check the codes before get pushed to `release` branch
  then releasing the new version. Beside that, from now on the `develop` branch
  very rarely active, instead use the `master` branch for any PRs and future changes.
* Now `pylint` only uses Python v3.7 and the latest one to check the codes.
* Now the workflow will create cache for installed dependencies
* PyLint are now will performs on both Ubuntu and Windows platform
This change introduces several modifications to the `codeql` workflow:

- The workflow has been reconfigured to exclude Python setup and analysis.
- CodeQL analysis now covers both Ubuntu and Windows platforms to ensure code portability.
- The cache step has been configured to store installed Maven dependencies, improving workflow efficiency.

It's worth noting that the analysis of Python code has been moved to the PyLint workflow.
Additionally, JMatrix's public APIs are primarily built in Java, emphasizing stability, portability, and security.
This shift allows us to focus on enhancing the quality of the Java-based public APIs.
* Changed the workflow name
* Added description about the workflow
@mitsuki31 mitsuki31 added the chore Maintenance updates (e.g Github Actions) label Aug 11, 2023
@mitsuki31 mitsuki31 self-assigned this Aug 11, 2023
Copy link
Owner Author

Choose a reason for hiding this comment

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

The CodeQL workflow has been modified to exclude the setup and analysis of Python code, as this aspect is now handled by the PyLint workflow. Our primary focus is enhancing the stability and portability of the main public APIs in the JMatrix library, which are implemented in Java.

@mitsuki31 mitsuki31 force-pushed the maintenance/improve-workflows branch from bc03153 to 4e8aecb Compare August 12, 2023 10:13
This workflow runs on 3 conditions:
  - Push
  - Pull request (PR)
  - Manual

This workflow designed for testing the project with the supported builder
(`Maven` and `Make`) and and help to find issues in the project code more easier.
@mitsuki31 mitsuki31 force-pushed the maintenance/improve-workflows branch from 4e8aecb to be91b08 Compare August 12, 2023 10:42
* Now the workflow only runs when the specified files are changed (only push).
* Introduced a debug option for the packaging step to aid in troubleshooting.
* Addressed limitations in Make's testing capabilities by focusing on compiling, packaging, and generating docs.
* The changes aim to enhance project testing, packaging, and documentation processes while allowing for debugging when needed.
* Remove unnecessary code on Make Test.
* Now the Maven Test will also clean up the project.
@mitsuki31 mitsuki31 force-pushed the maintenance/improve-workflows branch from baa85e5 to f286b32 Compare August 18, 2023 15:09
@mitsuki31 mitsuki31 marked this pull request as ready for review August 18, 2023 15:31
@mitsuki31 mitsuki31 merged commit f8a5739 into master Aug 18, 2023
13 checks passed
@mitsuki31 mitsuki31 deleted the maintenance/improve-workflows branch August 18, 2023 15:34
@mitsuki31 mitsuki31 mentioned this pull request Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance updates (e.g Github Actions)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant