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

CI Linting: Fix missing sources checkout in toml job. #1371

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

gibbz00
Copy link
Contributor

@gibbz00 gibbz00 commented Dec 30, 2023

Hi,

I saw that this project runs a toml job during the CI lint workflow using taplo, but I suspect that it will always succeed given that no projects files have been checked out.

toml:
runs-on: ubuntu-latest
container:
image: tamasfe/taplo:0.8.0
steps:
- run: taplo lint
- run: taplo fmt --check --diff

Example output from https://github.com/chronotope/chrono/actions/runs/7355211902/job/20023493157:

INFO taplo:format_files:collect_files: found files total=0 excluded=0 cwd="/__w/chrono/chrono"

Here's the job I'm using on a personal project:

toml_validation:
  name: Toml validation
  runs-on: ubuntu-latest
  container:
    image: tamasfe/taplo:0.8.0
  steps:
    - name: Checkout sources
      uses: actions/checkout@v4
    - name: taplo lint
      run: taplo lint
    - name: taplo fmt
      run: taplo fmt --check --diff

Which results in the following output:

INFO taplo:format_files:load_config: found configuration file path="/__w/rops/rops/taplo.toml"
INFO taplo:format_files:collect_files: found files total=5 excluded=0 cwd="/__w/rops/rops"

Above indicates that the taplo.toml config was found, which should be taplo.toml for chrono, but also that a non-zero amount of toml files were in fact checked.

It's such a small fix that I couldn't be bothered to open up an issue first, hope that's ok ✌️

Update:

Result from PR action:

Run taplo lint
 INFO taplo:load_config: found configuration file path="/__w/chrono/chrono/taplo.toml"
 INFO taplo:lint_files:collect_files: found files total=5 excluded=0 cwd="/__w/chrono/chrono"

Run taplo fmt --check --diff
 INFO taplo:format_files:load_config: found configuration file path="/__w/chrono/chrono/taplo.toml"
 INFO taplo:format_files:collect_files: found files total=5 excluded=0 cwd="/__w/chrono/chrono"

Copy link

codecov bot commented Dec 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5aaf742) 92.99% compared to head (1412ffa) 93.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1371      +/-   ##
==========================================
+ Coverage   92.99%   93.00%   +0.01%     
==========================================
  Files          34       34              
  Lines       16637    16664      +27     
==========================================
+ Hits        15472    15499      +27     
  Misses       1165     1165              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@djc
Copy link
Member

djc commented Jan 9, 2024

This should be rebased on to the 0.4.x branch, can you do that?

@gibbz00
Copy link
Contributor Author

gibbz00 commented Jan 9, 2024

Sure 🙂 Should the PR also be sent against that branch?

@djc
Copy link
Member

djc commented Jan 9, 2024

Yes.

@gibbz00 gibbz00 changed the base branch from main to 0.4.x January 9, 2024 16:26
@gibbz00
Copy link
Contributor Author

gibbz00 commented Jan 9, 2024

Resolved!

@djc djc merged commit 65f0cc2 into chronotope:0.4.x Jan 9, 2024
@djc
Copy link
Member

djc commented Jan 9, 2024

Thanks!

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