eco-infra / ecoinfra

Emission prediction tool
https://eco-infra.com
Apache License 2.0
6 stars 3 forks source link

Move Lint CI job to a new workflow that runs on pull requests (and on merges) #37

Closed jasongwartz closed 3 weeks ago

jasongwartz commented 3 weeks ago

This PR adds a "lint" CI job in a new workflow (pr-lint.yaml) to run linting on PRs. Linting is still also run on commits to master (as a prep step before release).

In order to use the exact same lint job configuration for both PRs and a pre-release check, I've created a new sub-workflow lint.yaml that contains the job steps for the linting itself.

I have otherwise not changed the content of the linting CI job, though I could look at possible improvements if this was desired (eg. annotating PR diffs with the linter failures).

Fixes https://github.com/eco-infra/ecoinfra/issues/20

How Has This Been Tested?

Hard to test locally, but this PR will serve as a test of the PR-linting part.

I've verified the configuration using the excellent actionlint tool.