82 lines (67 loc) · 2.01 KB
/
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
73
74
75
76
77
78
79
80
81
82
name: Tests
on:
pull_request:
paths:
- "go.*"
- "pkg/**"
- "cmd/**"
- "Makefile"
- "vendor/**"
push:
branches: [ master, main ]
defaults:
run:
shell: bash
env:
BUILDKIT_PROGRESS: plain
DOCKER_CLI_EXPERIMENTAL: enabled
DDEV_DEBUG: true
jobs:
tests:
defaults:
run:
shell: bash
strategy:
matrix:
webserver: [apache-fpm, nginx-fpm]
tests: [test]
os: [ ubuntu-20.04 ]
mutagen: ['false', 'true']
no-bind-mounts: ['true', 'false']
fail-fast: false
runs-on: ${{ matrix.os }}
env:
DDEV_TEST_WEBSERVER_TYPE: ${{ matrix.webserver }}
DDEV_NONINTERACTIVE: "true"
DDEV_TEST_USE_MUTAGEN: ${{ matrix.mutagen }}
DDEV_TEST_NO_BIND_MOUNTS: ${{ matrix.no-bind-mounts }}
steps:
- uses: actions/checkout@v2
- name: GOTEST_SHORT setup - use "true" except for testfullsitesetup
run: |
if [ "${{ matrix.tests }}" != "testfullsitesetup" ]; then
echo "GOTEST_SHORT=true" >> $GITHUB_ENV
fi
- name: Install Docker and deps (Linux)
if: matrix.os == 'ubuntu-20.04'
run: ./.github/workflows/linux-setup.sh
# - name: Install Docker and deps (macOS)
# if: matrix.os == 'macos-latest'
# run: ./.github/workflows/macos-setup.sh
- uses: actions/setup-go@v2
if: matrix.os == 'ubuntu-20.04'
with:
go-version: 1.*
# - name: Clean up self-hosted runners if necessary
# if: matrix.os[1] == 'self-hosted'
# run: .github/workflows/selfhosted-maintenance.sh
- name: DDEV tests
run: |
echo "$(docker --version) $(docker-compose --version)"
echo "DDEV_TEST_USE_MUTAGEN=${DDEV_TEST_USE_MUTAGEN}"
make ${{ matrix.tests }}
- name: Store test results
uses: actions/upload-artifact@v2
with:
name: ddev-test-results-${{ matrix.webserver }}
path: /tmp/testresults/