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

feat: add auto-config and build inputs. #61

Merged
merged 6 commits into from
Jul 11, 2024

Conversation

austinletson
Copy link
Collaborator

@austinletson austinletson commented Jun 14, 2024

auto-config allows users to specify if lean-action should use the Lake workspace to automatically decide which CI features to run.

build allows users to specify if lean-action runs lake build.

By default, auto-config: true.

The test and build (and soon lint, see #46) inputs allow users to override the automatically configured behavior or configure lean-action when auto-config: false.

auto-config: true is close to the previous default behavior, however there is a difference in the outcome of the lake test step. When users set test: true manually, lean-action must find tests with lake check-test and run lake test or it will fail (this was the previous behavior). However with auto-config: true, if lake check-test fails, lean-action will not run lake test and this won't cause lean-action to fail.

Closes #60, #53, and #30.

@austinletson austinletson linked an issue Jun 14, 2024 that may be closed by this pull request
@austinletson
Copy link
Collaborator Author

For a better idea of how these options are presented to users see the new ## Configuring which features lean-action runs section in the README.md.

@@ -26,15 +26,95 @@ jobs:
- uses: leanprover/lean-action@v1-beta
```

## Configuring which features `lean-action` runs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@semorrison I don't think you need to go through the entire change set of this PR, however could you take a look at this new section of the README which outlines how users will configure lean-action moving forward to confirm this is the right direction.

Note, the plan is to include lake lint in the list of features which can be automatically configured (using lake check-lint).

@austinletson austinletson force-pushed the 60-create-auto-config-input branch from fb1df33 to 950b45b Compare July 7, 2024 14:15
`auto-config` allows users to specify if `lean-action` should
use the Lake workspace to automatically decide which CI features to run.

`build` allows users to specify if `lean-action` runs `lake build`.

By default, `auto-config: true`.

The `test` and `build` (and soon `lint`, see #46) inputs
allow users to override the automatically configured behavior
or configure `lean-action` when `auto-config: false`.

`auto-config: true` is close to the previous default behavior,
however there is a difference in the outcome of the `lake test` step.
When users set `test: true` manually, `lean-action` must find tests
with `lake check-test` and run `lake test` or it will fail
(this was the previous behavior). However with `auto-config: true`,
if `lake check-test` fails, `lean-action` will not run `lake test`
and this won't cause `lean-action` to fail.
@austinletson
Copy link
Collaborator Author

I am going to go ahead and merge this to keep things moving toward v1. We can revisit the inputs at any time. The behavior of auto-config isn't set in stone.

@austinletson austinletson merged commit df9ad20 into main Jul 11, 2024
12 checks passed
oliver-butterley pushed a commit to oliver-butterley/lean-update that referenced this pull request Jul 11, 2024
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.

Create auto-config input
1 participant