Skip to content

Commit 9f5882c

Browse files
authored
Merge pull request #70 from coq-community/opam-ci-test
use opam testing facilities to run tests in CI
2 parents 1afda59 + 51014d3 commit 9f5882c

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

.github/workflows/coq-action.yml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,9 @@ jobs:
2323
with:
2424
opam_file: 'coq-paramcoq.opam'
2525
custom_image: ${{ matrix.image }}
26-
custom_script: |
27-
startGroup Print opam config
28-
opam config list; opam repo list; opam list
29-
endGroup
30-
startGroup Build dependencies
31-
opam pin add -n -y -k path $PACKAGE $WORKDIR
32-
opam update -y
33-
opam install -y -j 2 $PACKAGE --deps-only
34-
endGroup
35-
startGroup Build
36-
opam install -y -v -j 2 $PACKAGE
37-
opam list
38-
endGroup
39-
startGroup Workaround permission issue
40-
sudo chown -R coq:coq .
41-
endGroup
42-
startGroup Run tests
43-
make -C test-suite examples
44-
endGroup
45-
startGroup Uninstallation test
46-
opam remove $PACKAGE
47-
endGroup
48-
- name: Revert permissions
49-
if: ${{ always() }}
50-
run: sudo chown -R 1001:116 .
26+
export: 'OPAMWITHTEST'
27+
env:
28+
OPAMWITHTEST: 'true'
5129

5230
# See also:
5331
# https://github.com/coq-community/docker-coq-action#readme

coq-paramcoq.opam

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ The plugin is still in an experimental state. It is not very user friendly (lack
1313
"""
1414

1515
build: [make "-j%{jobs}%" ]
16-
install: [make "install"]
16+
install: [
17+
[make "install"]
18+
[make "-C" "test-suite" "examples"] {with-test}
19+
]
1720
depends: [
1821
"coq" {= "dev" }
1922
]

0 commit comments

Comments
 (0)