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

New GitHub Actions workflows #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

invisiblepancake
Copy link

This pull request introduces new GitHub Actions workflows for Python and R code analysis. The most important changes include the addition of workflows for running pylint on Python code and for running checks on R code.

New GitHub Actions workflows:

  • .github/workflows/pylint.yml: Added a workflow to run pylint on Python code for multiple Python versions (3.8, 3.9, 3.10) on push events.
  • .github/workflows/r.yml: Added a workflow to run checks on R code for multiple R versions (3.6.3, 4.1.1) on push and pull request events targeting the main branch.

Copy link
Author

@invisiblepancake invisiblepancake left a comment

Choose a reason for hiding this comment

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

New GitHub Actions Workflows

Pylint Workflow

Filename: .github/workflows/pylint.yml
Purpose: Runs pylint on Python code for multiple Python versions (3.8, 3.9, 3.10) on push events.

Key Steps:

Checkout the repository.
Set up Python versions 3.8, 3.9, and 3.10.
Install dependencies with pip install pylint.
Run pylint on Python files.
R Workflow
Filename: .github/workflows/r.yml
Purpose: Runs checks on R code for multiple R versions (3.6.3, 4.1.1) on push and pull request events targeting the main branch.
Key Steps:
Checkout the repository.
Set up R versions 3.6.3 and 4.1.1.
Install dependencies with install.packages and remotes::install_deps.
Run rcmdcheck::rcmdcheck.
Both workflows set up the respective environments, install necessary dependencies, and run linting or checks to ensure code quality.

Copy link
Author

@invisiblepancake invisiblepancake left a comment

Choose a reason for hiding this comment

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

actions that are not certified by GitHub.

They are provided by a third-party and are governed by

separate terms of service, privacy policy, and support

documentation.

Copy link
Author

@invisiblepancake invisiblepancake left a comment

Choose a reason for hiding this comment

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

File Details:

The workflow is named "R".
It triggers on push and pull request events to the main branch.
Permissions are set to read contents.
Job Configuration:

The workflow runs on macos-latest.
It uses a matrix strategy to test against R versions 3.6.3 and 4.1.1.
Steps:

Checkout Code:

  • uses: actions/checkout@v4
    Set Up R:

YAML

  • name: Set up R ${{ matrix.r-version }}
    uses: r-lib/actions@f57f130
    with:
    r-version: ${{ matrix.r-version }}
    Install Dependencies:

YAML

  • name: Install dependencies
    run: |
    install.packages(c("remotes", "rcmdcheck"))
    remotes::install_deps(dependencies = TRUE)
    shell: Rscript {0}
    Check:

YAML

  • name: Check
    run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
    shell: Rscript {0}
    Recommendations:
    Ensure that the versions of the actions used (actions/checkout@v4 and r-lib/actions@f57f130) are up-to-date and compatible with your workflow.
    Verify that all required dependencies and their versions are correctly specified and installed.
    Consider adding additional steps for more comprehensive testing, such as running unit tests or linting the code.

Copy link
Author

@invisiblepancake invisiblepancake left a comment

Choose a reason for hiding this comment

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

Adds a workflow to run Pylint on Python versions 3.8, 3.9, and 3.10, including steps to set up Python, install dependencies, and run Pylint on Python files.

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.

1 participant