forked from rbayliss/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (57 loc) · 1.57 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Test
on:
push:
branches-ignore: master
jobs:
test-image:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- "7.0"
- "7.0-dev"
- "7.1"
- "7.1-dev"
- "7.2"
- "7.2-dev"
- "7.3"
- "7.3-dev"
- "7.4"
- "7.4-dev"
- "8.0"
- "8.0-dev"
- "8.1"
- "8.1-dev"
- "8.2"
- "8.2-dev"
- "8,3"
- "8.3-dev"
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Build Image
run: docker build -t lastcallmedia/php:${{ matrix.version }} ./${{ matrix.version }}
- name: Unit Test Image
uses: ./.github/actions/container-structure-test
with:
image: lastcallmedia/php:${{ matrix.version }}
config: ./${{ matrix.version }}/test.yml
- name: "Verify image starts Apache"
run: |
IMG=$(docker run -d -p 8080:80 lastcallmedia/php:${{ matrix.version }})
sleep 3
curl -I http://localhost:8080
docker stop $IMG
check-template:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v1
- name: Setup dockerize
uses: zcong1993/[email protected]
with:
dockerize-version: '0.6.1'
- name: Run regenerate
run: ./regenerate.sh
- name: Check diff
run: '[[ -z $(git status --porcelain) ]] || { echo "Changes detected to template that are not reflected in the repository."; exit 1; }'