File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change 70
70
dockerfile : base
71
71
repo : ${{ github.repository }}
72
72
73
- - name : Run Test
73
+ - name : Setup Bats and Bats libs
74
+ uses :
brokenpip3/[email protected]
75
+ with :
76
+ bats-version : ' 1.8.2'
77
+ support-version : 0.3.0
78
+ assert-version : 2.1.0
79
+ file-install : false
80
+ detik-install : false
81
+
82
+ # LIB_PATH is a env var I use in the setup() function of my bats tests
83
+ # it points to the folder containing bats-assert and bats-support
84
+ - name : Run Test
74
85
run : |
75
- docker run ${{ env.TAG }} /bin/bash -c "make clean; make all && make install"
86
+ export LIB_PATH=/usr/lib/
87
+ export DOCKER_IMAGE=${{ env.TAG }}
88
+ bats tests/base.bats
76
89
77
90
base-test-2 :
78
91
name : Test 2 Base - ${{ matrix.idris-version }}
97
110
98
111
- name : Run Test
99
112
run : |
100
- docker run ${{ env.TAG }} /bin/bash -c "make clean; make all; make test"
113
+ docker run ${{ env.TAG }} /bin/bash -c "make test"
101
114
102
115
# it would be nice to make the if conditional in the top level of the job,
103
116
# but since devcontainer-build depends on this, we need this to run on a PR success as well
Original file line number Diff line number Diff line change
1
+ # Consumer idris
2
+ # Tests the idris installation inside the "consumer" images - Ubuntu and Debian
3
+
4
+ function setup() {
5
+ # Assumes the BATS_TEST_FILENAME is always one layer deep inside tests/
6
+ # not a very good assumption! But i'm not going to be using bats much right now...
7
+ DIR=" $( dirname $( dirname " $BATS_TEST_FILENAME " ) ) "
8
+
9
+ # by default, look in tests/test_helper
10
+ if [[ -z " ${LIB_PATH} " ]]; then
11
+ LIB_PATH=" $DIR /tests/test_helper"
12
+ fi
13
+
14
+ load " $LIB_PATH /bats-support/load"
15
+ load " $LIB_PATH /bats-assert/load"
16
+ }
17
+
18
+ @test " Test location of Idris binary" {
19
+ # note that the consumer images have an entrypoint of the "idris2" binary
20
+ run docker run --entrypoint /bin/bash $DOCKER_IMAGE which idris2
21
+ assert_output --partial ' /root/.idris2/bin/idris2'
22
+ }
23
+
24
+ @test " Test install-api" {
25
+ # make sure `install-api` is installed correctly
26
+ # by building idris2-python module
27
+
28
+ # run contents of tests/build-idris2-python.sh in the image
29
+ run docker run -i --entrypoint /bin/bash $DOCKER_IMAGE < tests/build-idris2-python.sh
30
+ refute_output --partial " required idris2 any but no matching version is installed"
31
+ }
Original file line number Diff line number Diff line change
1
+ git clone https://github.com/madman-bob/idris2-python.git
2
+ cd idris2-python
3
+ make install
You can’t perform that action at this time.
0 commit comments