File tree Expand file tree Collapse file tree 2 files changed +21
-32
lines changed Expand file tree Collapse file tree 2 files changed +21
-32
lines changed Original file line number Diff line number Diff line change @@ -23,46 +23,18 @@ jobs:
2323
2424 - name : Setup Bats and bats libs
2525 id : setup-bats
26- 26+ 2727
2828 - name : Run Unit Tests
2929 run : make test
30- shell : bash
30+ shell : bash
3131
3232 intg-test :
3333 name : intg-test
3434 runs-on : ubuntu-latest
35- strategy :
36- matrix :
37- container :
38- - debian # uses debian:buster-20200327-slim which is debian 10.3
39- - ubuntu16 # uses ubuntu:xenial-20200212 which is ubuntu 16.04
40-
41- container : kdabir/has-test-containers:${{ matrix.container }}
42-
43- steps :
44- - name : Clone Repo
45- uses : actions/checkout@v4
46-
47- - name : test
48- run : make test
49- shell : bash
50-
51- test_all :
52- name : test_all
53- runs-on : ubuntu-latest
54- strategy :
55- matrix :
56- container :
57- - ubuntu # uses ubuntu:bionic-20200311 which is ubuntu 18.04
58- - alpine # uses bash:5.0.16 which is alpine 3.11
59-
60- container : kdabir/has-test-containers:${{ matrix.container }}
61-
6235 steps :
6336 - name : Clone Repo
6437 uses : actions/checkout@v4
65-
66- - name : test_all
67- run : bats -t ./tests/test_all_packages.bats
38+ - name : Run Integration Tests in Docker
39+ run : make docker-test
6840 shell : bash
Original file line number Diff line number Diff line change @@ -42,3 +42,20 @@ uninstall :
4242
4343.PHONY : test install uninstall update
4444
45+ CONTAINERS = ubuntu alpine
46+
47+ .PHONY : docker-test
48+
49+ docker-test :
50+ @for c in $(CONTAINERS ) ; do \
51+ $(MAKE ) docker-test-$$ c; \
52+ done
53+
54+ .PHONY : docker-test-%
55+ docker-test-% :
56+ docker build -t test-image:$* -f docker/$* /Dockerfile .
57+ docker run --rm \
58+ -v $(PWD ) :/workspace \
59+ -w /workspace \
60+ test-image:$* \
61+ bash -c " make test || bats -t ./tests/test_all_packages.bats || true"
You can’t perform that action at this time.
0 commit comments