Skip to content

Commit bc06274

Browse files
authored
Github actions (#158)
1 parent bd32e0b commit bc06274

File tree

2 files changed

+70
-84
lines changed

2 files changed

+70
-84
lines changed

.circleci/config.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/integration.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
3+
name: Integration Tests
4+
5+
on:
6+
push:
7+
8+
jobs:
9+
10+
tls_build_and_test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
max-parallel: 5
14+
matrix:
15+
go-version: [1.16.x, 1.17.x, 1.18.x]
16+
steps:
17+
- uses: actions/setup-go@v2
18+
with:
19+
go-version: ${{ matrix.go-version}}
20+
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v3
22+
with:
23+
repository: redis/redis
24+
path: redis
25+
- name: generate ssl certificates
26+
run: |
27+
cd redis
28+
./utils/gen-test-certs.sh
29+
chmod a+r tests/tls/*
30+
- name: copy redisearch binary
31+
run: |
32+
docker run --rm --entrypoint cat redislabs/redisearch:edge /usr/lib/redis/modules/redisearch.so > redisearch.so
33+
docker run --rm --entrypoint cat redislabs/redisearch:edge /usr/lib/redis/modules/rejson.so > rejson.so
34+
chmod 755 *.so
35+
- name: Start redisearch docker with tls
36+
run: |
37+
docker run -d -v $(pwd)/redisearch.so:/data/redisearch.so \
38+
-v $(pwd)/rejson.so:/data/rejson.so \
39+
-v $(pwd)/redis/tests/tls/:/data \
40+
-p 6379:6379 redisfab/redis:6.2-latest-x64-bullseye redis-server \
41+
--tls-port 6379 --port 0 \
42+
--tls-cert-file /data/redis.crt \
43+
--tls-key-file /data/redis.key \
44+
--tls-ca-cert-file /data/ca.crt \
45+
--tls-auth-clients no --loadmodule /data/redisearch.so --loadmodule /data/rejson.so
46+
47+
- name : Run Examples
48+
run: |
49+
make examples TLS_CERT=redis/tests/tls/redis.crt TLS_KEY=redis/tests/tls/redis.key TLS_CACERT=redis/tests/tls/ca.crt
50+
51+
build_and_test:
52+
runs-on: ubuntu-latest
53+
strategy:
54+
max-parallel: 5
55+
matrix:
56+
go-version: [1.16.x, 1.17.x, 1.18.x]
57+
steps:
58+
- uses: actions/setup-go@v2
59+
with:
60+
go-version: ${{ matrix.go-version}}
61+
- uses: actions/checkout@v3
62+
- name: Start redisearch docker
63+
run: |
64+
docker run -d -p 6379:6379 redislabs/redisearch:edge
65+
- run: make get
66+
- run: make checkfmt
67+
- run: make test
68+
- run: make godoc_examples
69+
- run: make coverage
70+
- run: bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov)

0 commit comments

Comments
 (0)