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

Expand linting GitHub Actions Workflow to include oldstable, unstable container images #206

Closed
atc0005 opened this issue Feb 1, 2022 · 0 comments · Fixed by #207
Closed
Assignees
Labels
CI enhancement New feature or request linting
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Feb 1, 2022

Currently the code is linted using the "stable" index.docker.io/atc0005/go-ci:go-ci-lint-only container in two different workflows:

  • name: Quick Validation
    # Run builds for Pull Requests (new, updated)
    # `synchronized` seems to equate to pushing new commits to a linked branch
    # (whether force-pushed or not)
    on:
    push:
    jobs:
    lint_and_test_code:
    name: Lint and test using latest stable container
    runs-on: ubuntu-latest
    timeout-minutes: 10
    container:
    image: index.docker.io/atc0005/go-ci:go-ci-lint-only

  • name: Validate Codebase
    # Run builds for Pull Requests (new, updated)
    # `synchronized` seems to equate to pushing new commits to a linked branch
    # (whether force-pushed or not)
    on:
    #push:
    pull_request:
    types: [opened, synchronize]
    jobs:
    lint_code:
    name: Lint codebase
    runs-on: ubuntu-latest
    timeout-minutes: 10
    container:
    image: index.docker.io/atc0005/go-ci:go-ci-lint-only

The first workflow is meant as a quick validation check (linting & tests) on push. The second, more comprehensive workflow is used on pull requests only and applies linting, test & build jobs. The tests and builds are performed using three different containers:

  • oldstable
  • stable
  • unstable

I plan to extend this second workflow to also use the unstable image in linting checks. I don't yet see the value in linting using the oldstable image also, but will include it also just to "cover the bases".

Based on recent GHAW runs, I expect that the unstable image will generate numerous linting complaints as I test out more strict linting options in that image. Based on this, I will refrain from setting linting results for that container as required "OK" before allowing merges. This may require adding a second GHAW job to run the linting checks using that container so that the existing Validate Codebase results remain unaffected (this GHAW is required to pass).

@atc0005 atc0005 added enhancement New feature or request CI linting labels Feb 1, 2022
@atc0005 atc0005 added this to the Next Release milestone Feb 1, 2022
@atc0005 atc0005 self-assigned this Feb 1, 2022
atc0005 added a commit that referenced this issue Feb 1, 2022
Use the same matrix of containers for linting in the
`Validate Codebase` GHAW that we're already using
for testing and building jobs.

This applies the minimum linting requirements in addition
to testing "unstable" linting options that may become the
new baseline in the future.

refs GH-206
atc0005 added a commit that referenced this issue Feb 1, 2022
Use the same matrix of containers for linting in the
`Validate Codebase` GHAW that we're already using
for testing and building jobs.

This applies the minimum linting requirements in addition
to testing "unstable" linting options that may become the
new baseline in the future.

refs GH-206
atc0005 added a commit that referenced this issue Feb 1, 2022
Use the same matrix of containers for linting in the
`Validate Codebase` GHAW that we're already using
for testing and building jobs.

This applies the minimum linting requirements in addition
to testing "unstable" linting options that may become the
new baseline in the future.

refs GH-206
atc0005 added a commit that referenced this issue Feb 1, 2022
Use the same matrix of containers for linting in the
`Validate Codebase` GHAW that we're already using
for testing and building jobs.

This applies the minimum linting requirements in addition
to testing "unstable" linting options that may become the
new baseline in the future.

refs GH-206
atc0005 added a commit that referenced this issue Feb 1, 2022
Use the same matrix of containers for linting in the
`Validate Codebase` GHAW that we're already using
for testing and building jobs.

This applies the minimum linting requirements in addition
to testing "unstable" linting options that may become the
new baseline in the future.

refs GH-206
atc0005 added a commit that referenced this issue Feb 1, 2022
Use the same matrix of containers for linting in the
`Validate Codebase` GHAW that we're already using
for testing and building jobs.

This applies the minimum linting requirements in addition
to testing "unstable" linting options that may become the
new baseline in the future.

One notable difference is that out of the matrix of containers
used for linting we mark the unstable container as "experimental"
and configure the job to ignore linting errors generated by
that container. This effectively makes any linting output from
the unstable container informational only as intended.

refs GH-206
@atc0005 atc0005 changed the title Add GitHub Actions Workflow for linting code using unstable container Expand GitHub Actions Workflow for linting code to include oldstable, unstable container images Feb 1, 2022
@atc0005 atc0005 changed the title Expand GitHub Actions Workflow for linting code to include oldstable, unstable container images Expand linting GitHub Actions Workflow to include oldstable, unstable container images Feb 1, 2022
This was referenced Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI enhancement New feature or request linting
Development

Successfully merging a pull request may close this issue.

1 participant