Skip to content

Run opam install with -t to run tests#48

Open
LasseBlaauwbroek wants to merge 1 commit into
rocq-prover:masterfrom
LasseBlaauwbroek:master
Open

Run opam install with -t to run tests#48
LasseBlaauwbroek wants to merge 1 commit into
rocq-prover:masterfrom
LasseBlaauwbroek:master

Conversation

@LasseBlaauwbroek

Copy link
Copy Markdown
Member

No description provided.

@erikmd

erikmd commented Dec 18, 2020

Copy link
Copy Markdown
Collaborator

Thanks @LasseBlaauwbroek − but I believe this use case was already addressed by this feature?

https://github.com/coq-community/docker-coq-action#export

@LasseBlaauwbroek

Copy link
Copy Markdown
Member Author

I guess so, but I would say that running tests is an integral part of CI. So it should be enabled by default.

@liyishuai

Copy link
Copy Markdown
Member

We may default OPAMWITHTEST to true and allow users to set it to false.
Having -t in command line will disallow users to configure.

@LasseBlaauwbroek

Copy link
Copy Markdown
Member Author

Yes, that's what I was thinking of as well.

@gares

gares commented Feb 11, 2021

Copy link
Copy Markdown
Member

oops, I did not see this when I opened #52 .
I think --with-test should not be padded to dependencies.
I like the suggestion of @liyishuai to make it configurable defaulting to on (for the package, not the deps)

@erikmd

erikmd commented Feb 11, 2021

Copy link
Copy Markdown
Collaborator

Hi all, thanks for your comments. To sum up:

Maybe we'll find another simple solution to achieve this; in the meantime I propose to postpone the merge of #52, e.g. to the next major/minor release of docker-coq-action.

@liyishuai

liyishuai commented Feb 11, 2021

Copy link
Copy Markdown
Member

IIUC dependencies are not tested by opam install --deps-only -t blah: https://opam.ocaml.org/doc/man/opam-install.html

-t, --with-test, --build-test
Build and run the package unit-tests. This only affects packages listed on the command-line.

In other words, -t and OPAMWITHTEST are ignored given -deps-only.

@erikmd

erikmd commented Feb 11, 2021

Copy link
Copy Markdown
Collaborator

@liyishuai OK I see.

Worth doing a small test anyway! :)
e.g. doing export OPAMWITHTEST=true then installing a package that depends on a package with a test specified… would you have the time to check this?

in which case, we could indeed think about a PR that asserts OPAMWITHTEST=true by default − except if passed otherwise like this:

  - uses: coq-community/docker-coq-action@v1
    with:
      opam_file: 'folder/coq-proj.opam'
      coq_version: 'dev'
      ocaml_version: '4.07-flambda'
      export: 'OPAMWITHTEST'
    env:
      OPAMWITHTEST: 'false'

liyishuai added a commit to liyishuai/coq-itree-io that referenced this pull request Feb 12, 2021
@liyishuai

Copy link
Copy Markdown
Member

Yes I've just examined that OPAMWITHTEST=true does not test dependencies.

@gares

gares commented Feb 12, 2021

Copy link
Copy Markdown
Member

See also rocq-prover/opam#1625

@LasseBlaauwbroek

Copy link
Copy Markdown
Member Author

Sounds indeed like OPAMWITHTEST is the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants