-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
52 lines (49 loc) · 1.41 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
name: Test
on:
# Run CI on all pushes to the master and release/** branches, and on all new
# pull requests, and on all pushes to pull requests (even if a pull request
# is not against master).
push:
branches:
- "master"
- "releases/**"
pull_request:
env:
DOCKER_COMPOSE_VERSION: 1.24.1
defaults:
run:
shell: bash
jobs:
test:
strategy:
# Only run one job at a time as they are quite demanding
max-parallel: 1
matrix:
py2: ["", "1"]
runs-on: ubuntu-18.04
name: "test${{ matrix.py2 == '1' && ' PY2' || ''}}"
steps:
- name: Pin docker-compose
run: |
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
- name: Checkout
uses: actions/checkout@v2
- name: Install and test
env:
COMPOSE_PARALLEL_LIMIT: 50
COMPOSE_HTTP_TIMEOUT: 450
SENTRY_PYTHON2: ${{ matrix.py2 == '1' || '' }}
run: |
./install.sh
./test.sh
printf "Testing in-place upgrade"
./install.sh --minimize-downtime
./test.sh
- name: Inspect failure
if: failure()
run: |
docker-compose ps
docker-compose logs