File tree 4 files changed +29
-6
lines changed
4 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 13
13
strategy :
14
14
matrix :
15
15
go : ['1.14', '1.15']
16
+ name : macOS Go${{ matrix.go }}
16
17
steps :
17
18
- name : Checkout
18
19
uses : actions/checkout@v2
26
27
run : go get -u -v -t ./...
27
28
- name : Test
28
29
run : go test -v -cover ./...
29
- test :
30
+ docker- test :
30
31
runs-on : ubuntu-latest
31
32
strategy :
32
33
matrix :
39
40
- fedora
40
41
- mingw
41
42
- quickstart
43
+ name : Docker ${{ matrix.runtime }}
42
44
steps :
43
45
- name : checkout
44
46
uses : actions/checkout@v2
45
47
- name : ${{ matrix.runtime }}
46
48
shell : ' script -q -e -c "bash {0}"'
47
49
run : bash ./test/runtime --driver docker --build --run ${{ matrix.runtime }}
50
+
51
+ vagrant-test :
52
+ runs-on : macos-10.15
53
+ strategy :
54
+ matrix :
55
+ runtime :
56
+ - freebsd
57
+ name : Vagrant ${{ matrix.runtime }}
58
+ steps :
59
+ - name : checkout
60
+ uses : actions/checkout@v2
61
+ - name : ${{ matrix.runtime }}
62
+ run : bash ./test/runtime --driver vagrant --build --run ${{ matrix.runtime }}
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ gosseract.iml
35
35
.vagrant
36
36
coverage.txt
37
37
vendor
38
+ test /runtimes /TESTRESULT. * .txt
38
39
39
40
# Editors
40
41
.vscode
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
set -e
4
- set -o pipefail
4
+ # set -o pipefail
5
5
6
6
PROJDIR=$( dirname " $( cd " $( dirname " ${0} " ) " ; pwd -P) " )
7
7
@@ -136,12 +136,16 @@ function test_vagrant_runtimes() {
136
136
echo " │ [Vagrant] Making VM up..."
137
137
vboxname=gosseract-test-${testcase}
138
138
VAGRANT_VAGRANTFILE=${runtime} VIRTUALBOX_NAME=${vboxname} vagrant up --provider virtualbox | sed " s/^/│ /"
139
- VAGRANT_VAGRANTFILE= ${runtime} VIRTUALBOX_NAME= ${vboxname} vagrant provision | sed " s/^/│ / "
139
+ TESTRESULT= ` cat test/runtimes/TESTRESULT. ${testcase} .txt `
140
140
VAGRANT_VAGRANTFILE=${runtime} vagrant halt | sed " s/^/│ /"
141
141
if [ -n " ${REMOVE} " ]; then
142
142
echo " │ [Vagrant] Removing VM..."
143
143
VAGRANT_VAGRANTFILE=${runtime} vagrant destroy -f | sed " s/^/│ /"
144
144
fi
145
+ if [ " ${TESTRESULT} " != " 0" ]; then
146
+ echo " Test failed: ${TESTCASE} "
147
+ exit 1
148
+ fi
145
149
echo " └───────────── ${testcase} [OK]"
146
150
done
147
151
}
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ Vagrant.configure("2") do |config|
16
16
mv /usr/local/share/tessdata/*.traineddata /tmp
17
17
mv /tmp/eng.traineddata /usr/local/share/tessdata/
18
18
cd $GOPATH/src/github.com/otiai10/gosseract
19
- go get -t -v ./...
20
- go test -v -cover github.com/otiai10/gosseract
21
- ', :env => {"GOPATH" => "/home/vagrant/go"}
19
+ go test -v -cover ./...
20
+ echo $? > /vagrant/test/runtimes/TESTRESULT.freebsd.txt
21
+ ', :env => {
22
+ "GOPATH" => "/home/vagrant/go",
23
+ "GO111MODULE" => "on",
24
+ }
22
25
end
You can’t perform that action at this time.
0 commit comments