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

Fix linting issues in GitHub Actions #461

Merged
merged 1 commit into from
Dec 22, 2024
Merged

Fix linting issues in GitHub Actions #461

merged 1 commit into from
Dec 22, 2024

Conversation

albertodvp
Copy link
Contributor

Hi :)

I'm testing the library with GHC912 and the haskell-actions one is already supporting that. In this PR I did some updates to the GHA build job, in particular:

  1. I've substituted the hspec setup action with the haskell-actions one. Note: cabal update is done by default by the used action.

  2. Replaced macOS-12 environment which is deprecated.

  3. I've also run actionlint and addressed those issues. Here is the output of that tool:

.github/workflows/build.yml:121:9: shellcheck reported issue in this script: SC2046:warning:1:12: Quote this to prevent word splitting [shellcheck]
    |
121 |       - run: cabal exec $(cabal list-bin spec)
    |         ^~~~
.github/workflows/build.yml:136:15: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
    |
136 |       - uses: actions/checkout@v3
    |               ^~~~~~~~~~~~~~~~~~~

I've prepared this during this event
Open Source Saturday

@albertodvp albertodvp changed the title Change haskell setup action in CI and minor adjustments Change Haskell setup action in CI and minor adjustments Dec 21, 2024
@albertodvp albertodvp marked this pull request as ready for review December 21, 2024 14:27
@sol
Copy link
Owner

sol commented Dec 21, 2024

Hi 👋

I'm testing the library with GHC912 and the haskell-actions one is already supporting that.

I think hspec/setup-haskell also already supported GHC 9.12.1. What it did not support was recent versions of macOS, as GitHub dropped support for ghcup from the macOS runner images. I fixed this in hspec/setup-haskell@cd264c7.

  1. I've substituted the hspec setup action with the haskell-actions one. Note: cabal update is done by default by the used action.

I'm not interested in this change at this point.

.github/workflows/build.yml:121:9: shellcheck reported issue in this script: SC2046:warning:1:12: Quote this to prevent word splitting [shellcheck]
    |
121 |       - run: cabal exec $(cabal list-bin spec)
    |         ^~~~
.github/workflows/build.yml:136:15: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
    |
136 |       - uses: actions/checkout@v3
    |               ^~~~~~~~~~~~~~~~~~~

This looks good. Can you rebase on main?

@albertodvp albertodvp force-pushed the main branch 3 times, most recently from bba08c5 to 9538b9b Compare December 22, 2024 00:07
@albertodvp
Copy link
Contributor Author

albertodvp commented Dec 22, 2024

Thanks for the review. Assuming I'm understanding correctly, I've:

  • removed the haskell-actions/setup
  • kept the linting suggestions
  • (rebased)

Does it look good? If it does, I would to rename the PR to something like: Apply lint to GHA (I'm not doing that by myself to avoid confusion)

@@ -46,9 +46,6 @@ jobs:
- 8.10.5
- 8.10.6
- 8.10.7
# - 9.0.1
# - 9.0.2
# - 9.2.1
Copy link
Owner

Choose a reason for hiding this comment

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

This documents which versions have CI issues. For that reason I would like to keep these.

@@ -64,7 +61,6 @@ jobs:
- 9.4.6
- 9.4.7
- 9.4.8
# - 9.6.1
Copy link
Owner

Choose a reason for hiding this comment

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

Same here.

@@ -78,7 +74,6 @@ jobs:
- os: macos-latest
ghc: 9.10.1
- os: windows-latest
# ghc: system
Copy link
Owner

Choose a reason for hiding this comment

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

Same here.

@@ -88,7 +83,7 @@ jobs:

- run: cabal update
- run: cabal build
- run: cabal exec $(cabal list-bin spec)
- run: cabal exec "$(cabal list-bin spec)"
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@@ -101,6 +96,6 @@ jobs:
- run: false
if: needs.build.result != 'success'

- uses: actions/checkout@v3
- uses: actions/checkout@v4
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@sol
Copy link
Owner

sol commented Dec 22, 2024

Thanks for the review. Assuming I'm understanding correctly, I've:

  • removed the haskell-actions/setup
  • kept the linting suggestions
  • (rebased)

Yes exactly 👍

I would to rename the PR to something like: Apply lint to GHA

Yes, please go ahead. But instead of using an acronym, please spell it out, also in the commit message.

The lints were generated using actionlint
@albertodvp albertodvp changed the title Change Haskell setup action in CI and minor adjustments Fix linting issues in GitHub Actions Dec 22, 2024
@albertodvp albertodvp requested a review from sol December 22, 2024 08:34
@sol sol enabled auto-merge (rebase) December 22, 2024 14:29
@sol
Copy link
Owner

sol commented Dec 22, 2024

Thanks a lot for your contribution.

@sol sol merged commit 6eb2a1c into sol:main Dec 22, 2024
52 checks passed
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.

2 participants