-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·72 lines (60 loc) · 2.03 KB
/
container-tests.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Container tests
defaults:
run:
shell: bash
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
# Only run when something changes in the actual containers
paths:
- "containers/**"
- ".github/workflows/**"
schedule:
- cron: '01 00 * * *'
env:
DDEV_IGNORE_EXPIRING_KEYS: "false"
# Unfortunately, we can't test forked PRs with the secret that's provided for this
# So it has to be hard-wired here. Needs to be switched back to "90" after mysql
# key is updated, see https://github.com/docker-library/mysql/issues/801
DDEV_MAX_DAYS_BEFORE_CERT_EXPIRATION: "90"
jobs:
container-build-and-test:
name: ${{ matrix.os }} - Test container ${{ matrix.containers }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
containers: [dbserver, webserver, others]
steps:
- uses: actions/checkout@v2
- name: Install Docker and deps (Linux)
if: matrix.os == 'ubuntu-20.04'
run: ./.github/workflows/linux-setup.sh
- uses: actions/setup-go@v2
with:
go-version: 1.*
- name: Build and test container ${{ matrix.containers }}
run: |
docker version
set -eu -o pipefail
if [[ "${{ matrix.containers }}" == "dbserver" ]]; then
pushd containers/ddev-dbserver
echo "--- Test container dbserver"
time make test DOCKER_ARGS="--no-cache"
popd
elif [[ "${{ matrix.containers }}" == "webserver" ]]; then
pushd containers/ddev-webserver
echo "--- Test container ddev-webserver"
time make test DOCKER_ARGS="--no-cache"
popd
elif [[ "${{ matrix.containers }}" == "others" ]]; then
for dir in ddev-router ddev-ssh-agent test-ssh-server
do pushd containers/$dir
echo "--- Test container $dir"
time make test DOCKER_ARGS=--no-cache
popd
done
fi
set +eu