coq-community / docker-coq-action

GitHub Action using Docker-Coq [maintainers=@erikmd,@Zimmi48]
MIT License
12 stars 4 forks source link

opam_file should not be mandatory #26

Closed JasonGross closed 4 years ago

JasonGross commented 4 years ago

It doesn't seem necessary, and I'd rather not be forced to pass a dummy string / create a dummy opam file.

Zimmi48 commented 4 years ago

But what would be the default in case you don't set custom_script?

JasonGross commented 4 years ago

Make the default script error if it's not there. It seems fine to make having neither custom script nor opam file a runtime error, rather than picking one of them and making it an earlier runtime error to not have that one.

Zimmi48 commented 4 years ago

Another solution would be for the default script to look for a unique *.opam file at the root of the repository if this variable is not provided. This would mean that the simplest possible CI configuration would become just:

name: CI

on:
  push:
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: coq-community/docker-coq-action@v1

WDYT @erikmd?

erikmd commented 4 years ago

Hi, admittedly in the docker-coq-action snippet I suggested on Zulip, the fact one has to put a dummy .opam filename when overriding custom_script (albeit this is not the "standard" use case of docker-coq-action) is a bit ugly. Next, what @Zimmi48 suggest in his comment https://github.com/coq-community/docker-coq-action/issues/26#issuecomment-695772309 looks appealing, and I'd just suggest a variation of his suggestion:

As a result:

@Zimmi48 @JasonGross: If this new semantics look good to you, I'll open a PR.

Zimmi48 commented 4 years ago

Looks terrific!

Zimmi48 commented 3 years ago

Since opam_file is now optional, this means that the most simple workflow configuration corresponds to the one I wrote in my comment above (except that we can compress the on: part even more). I think that showing such a simple (complete) configuration somewhere near the top of the README would look great (to show how simple it is to use Docker-Coq-Action for simple use cases).