-
Notifications
You must be signed in to change notification settings - Fork 71
93 lines (75 loc) · 2.3 KB
/
replication.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
name: Sync Gateway Replication Tests
on:
push:
branches:
- master
- dev
- 'release/*'
pull_request:
branches:
- '**'
env:
BUILD_TYPE: Debug
jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
#### BUILD
- name: Create Build Environment
# Create a build directory, as our working directory for all subsequent commands
working-directory: ${{github.workspace}}
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
# "Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12"
working-directory: ${{github.workspace}}/build
run: cmake .. -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{ env.BUILD_TYPE }}
### START DOCKER CONTAINERS
- name: Start Docker containers
run: |
pushd Replicator/tests/data/docker
docker compose up --build -d
popd
- name: Wait for Sync Gateway up
timeout-minutes: 5
run: |
until curl -sIkL -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" --fail https://localhost:4985/scratch; do
printf '.'
sleep 10
done
echo "SG is up"
until curl -sIkL -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" --fail https://localhost:4885/scratch-30; do
printf '.'
sleep 10
done
echo "SG Legacy is up"
#### TEST
- name: Run SG Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: |
pushd LiteCore/tests
./CppTests -r quiet "[.SyncServerCollection]"
popd
- name: Run SG Legacy Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: |
pushd LiteCore/tests
./CppTests -r quiet "[.SyncServer30]"
popd
- name: Stop Docker containers
if: always()
run: |
pushd Replicator/tests/data/docker
docker compose down
popd