-
Notifications
You must be signed in to change notification settings - Fork 227
/
Copy path.travis.yml
178 lines (146 loc) · 5.64 KB
/
.travis.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# We don't specify a global language both because we use different
# languages in different jobs, and because in some cases travis
# language-specific automation either does things we don't want to do,
# or does them too early in the process, i.e. lein deps, etc. It's
# still possible to set the language explicitly for a job when that's
# appropriate.
language: generic
dist: bionic
# Always explicitly set sudo. Otherwise travis' defaults may vary
# based on when the repository testing was enabled.
sudo: required
services:
- docker
# The test specifications are all extracted from the PDB_TEST value.
# We explicitly set up lein and pgbox at the top level so that we can
# use them in commands like test-config, and so we can't end up doing
# it multiple times if any of the (e.g. boxed-) sub-commands also make
# the attempt.
aliases:
- &run-core-and-ext-tests |
set -e
ci/bin/prep-and-run-in travis "$PDB_TEST"
- &run-integration-tests |
set -e
ci/bin/prep-and-run-in travis "$PDB_TEST"
- &run-spec-tests |
set -e
ci/bin/prep-and-run-in travis "$PDB_TEST"
- &before-docker-tests
- sudo rm /usr/local/bin/docker-compose
- curl --location https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname --kernel-name`-`uname --machine` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- mkdir -vp ~/.docker/cli-plugins
- curl --location https://github.com/docker/buildx/releases/download/v${DOCKER_BUILDX_VERSION}/buildx-v${DOCKER_BUILDX_VERSION}.linux-amd64 > ~/.docker/cli-plugins/docker-buildx
- chmod +x ~/.docker/cli-plugins/docker-buildx
- docker buildx create --name travis_builder --use
- &run-docker-tests
- set -e
- cd docker
- make lint
- make build
- make test
- &after-docker-tests
- docker buildx rm travis_builder
jobs:
allow_failures:
- os: osx
include:
# === core+ext tests
- stage: ❧ pdb tests
name: core+ext jdk-11 pg-11
env: PDB_TEST=core+ext/openjdk11/pg-11
script: *run-core-and-ext-tests
- stage: ❧ pdb tests
name: core+ext jdk-11 pg-11 fips
env: PDB_TEST=core+ext/openjdk11/pg-11 LEIN_PROFILES=fips
script: *run-core-and-ext-tests
- stage: ❧ pdb tests
name: core+ext jdk-11 pg-11 drop-joins
env: PDB_TEST=core+ext/openjdk11/pg-11 PDB_QUERY_OPTIMIZE_DROP_UNUSED_JOINS=always
script: *run-core-and-ext-tests
- stage: ❧ pdb tests
name: core+ext jdk-11 pg-11
env: PDB_TEST=core+ext/openjdk11/pg-11 PDB_USE_DEPRECATED_QUERY_STREAMING_METHOD=no
script: *run-core-and-ext-tests
- stage: ❧ pdb tests
name: core+ext jdk-11 pg-12
env: PDB_TEST=core+ext/openjdk11/pg-12
script: *run-core-and-ext-tests
- stage: ❧ pdb tests
name: core+ext jdk-11 pg-13
env: PDB_TEST=core+ext/openjdk11/pg-13
script: *run-core-and-ext-tests
- stage: ❧ pdb tests
name: core+ext jdk-11 pg-14
env: PDB_TEST=core+ext/openjdk11/pg-14
script: *run-core-and-ext-tests
# Legacy testing, we do not promise support for jdk 8 or pg 9.6
- stage: ❧ pdb tests
name: core+ext jdk-8 pg-11
env: PDB_TEST=core+ext/openjdk8/pg-11
script: *run-core-and-ext-tests
- stage: ❧ pdb tests
name: core+ext jdk-8 pg-9.6
env: PDB_TEST=core+ext/openjdk8/pg-9.6
script: *run-core-and-ext-tests
# === integration with master branches
- stage: ❧ pdb tests
name: int pup-6.x srv-6.x jdk-11 pg-11
env: PDB_TEST=int/openjdk11/pup-6.x/srv-6.x/pg-11
script: *run-integration-tests
- stage: ❧ pdb tests
name: int pup-6.x srv-6.x jdk-11 pg-11 rich
env: PDB_TEST=int/openjdk11/pup-6.x/srv-6.x/pg-11/rich
script: *run-integration-tests
- stage: ❧ pdb tests
name: int pup-6.x srv-6.x jdk-11 pg-9.6 rich
env: PDB_TEST=int/openjdk11/pup-6.x/srv-6.x/pg-9.6/rich
script: *run-integration-tests
- stage: ❧ pdb tests
name: int pup-6.x srv-6.x jdk-8 pg-11 rich
env: PDB_TEST=int/openjdk8/pup-6.x/srv-6.x/pg-11/rich
script: *run-integration-tests
- stage: ❧ pdb tests
name: int pup-6.x srv-6.x jdk-8 pg-9.6 rich
env: PDB_TEST=int/openjdk8/pup-6.x/srv-6.x/pg-9.6/rich
script: *run-integration-tests
# === rspec tests
- stage: ❧ pdb tests
name: rspec pup-6.x
env: PDB_TEST=rspec/pup-6.x
script: *run-spec-tests
- stage: ❧ pdb tests
name: rspec pup-6.4.x
env: PDB_TEST=rspec/pup-6.4.x
script: *run-spec-tests
# === container tests
- stage: ❧ pdb tests
name: container tests
dist: focal
language: ruby
rvm: 2.6.6
# necessary to prevent overwhelming TravisCI build output limits
env: DOCKER_COMPOSE_VERSION=1.28.6 DOCKER_BUILDX_VERSION=0.5.1 DOCKER_BUILD_FLAGS="--progress plain" PUPPETSERVER_IMAGE="puppet/puppetserver:edge"
before_install: *before-docker-tests
script: *run-docker-tests
after_script: *after-docker-tests
on_success: ci/bin/travis-on-success
notifications:
email: false
slack:
on_success: change
on_failure: always
template:
- "<%{compare_url}|%{commit_subject}> | %{author}"
- "%{repository_slug} %{branch} | <%{build_url}|#%{build_number}> %{result} in %{elapsed_time}"
rooms:
secure: IJU0YgGYbKgM7NupaOmE2BYra2mNx7+e5vAYNL+5oaRXolbHCyg0WzfFWilhMK3KEi8oIMKXR4ZzoUZLAqeOQzX7nnsLqC3wjyDHCgxtp4O+5GNKyeLN4ItoI1f2d6qyiiBPkHgVPuLhG3yyQ+wD0dMc9vSYmxfoazqe9HD/9UE=
cache:
directories:
- /var/cache/apt/archives
- $HOME/.m2
- $HOME/Library/Caches/Homebrew
- ci/local/jdk
- vendor/bundle/ruby