Skip to content

Commit a2969a4

Browse files
chayimsazzad16
andauthored
Migrating to GitHub Actions from CircleCI (#2975)
Co-authored-by: M Sazzadul Hoque <[email protected]>
1 parent 3c18734 commit a2969a4

File tree

11 files changed

+189
-254
lines changed

11 files changed

+189
-254
lines changed

.circleci.settings.xml

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

.circleci/config.yml

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

.github/workflows/integration.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
3+
name: Integration
4+
5+
on:
6+
push:
7+
paths-ignore:
8+
- 'docs/**'
9+
- '**/*.md'
10+
- '**/*.rst'
11+
branches:
12+
- master
13+
- '[0-9].[0-9]'
14+
pull_request:
15+
branches:
16+
- master
17+
- '[0-9].[0-9]'
18+
19+
jobs:
20+
21+
build:
22+
name: Build and Test
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Set up publishing to maven central
27+
uses: actions/setup-java@v2
28+
with:
29+
java-version: '8'
30+
distribution: 'temurin'
31+
- name: stunnel
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y stunnel make
35+
make system-setup
36+
- name: Cache dependencies
37+
uses: actions/cache@v2
38+
with:
39+
path: |
40+
~/.m2/repository
41+
/var/cache/apt
42+
key: jedis-${{hashFiles('**/pom.xml')}}
43+
- name: mvn offline
44+
run: |
45+
mvn -q dependency:go-offline
46+
- name: run tests
47+
run: |
48+
TEST="" make test
49+
env:
50+
JVM_OPTS: -Xmx3200m
51+
TERM: dumb
52+
- name: redismod docker
53+
run: docker run --name mod -p 52567:6379 -d redislabs/redismod:edge
54+
- name: run tests
55+
run: mvn -q -DmodulesDocker="mod:52567" -Dtest="redis.clients.jedis.modules.**" test
56+
- name: codecov
57+
run: |
58+
bash <(curl -s https://codecov.io/bash)

.github/workflows/snapshot.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
3+
name: Publish Snapshot
4+
5+
on:
6+
workflow_run:
7+
workflows: [Integration]
8+
types: [completed]
9+
branches:
10+
- master
11+
- '[0-9].[0-9]'
12+
13+
jobs:
14+
15+
snapshot:
16+
name: Deploy Snapshot
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up publishing to maven central
21+
uses: actions/setup-java@v2
22+
with:
23+
java-version: '8'
24+
distribution: 'temurin'
25+
server-id: ossrh
26+
server-username: MAVEN_USERNAME
27+
server-password: MAVEN_PASSWORD
28+
- name: Cache dependencies
29+
uses: actions/cache@v2
30+
with:
31+
path: |
32+
~/.m2/repository
33+
/var/cache/apt
34+
key: jedis-${{hashFiles('**/pom.xml')}}
35+
- name: mvn offline
36+
run: |
37+
mvn -q dependency:go-offline
38+
- name: deploy
39+
run: |
40+
mvn --no-transfer-progress \
41+
-DskipTests deploy
42+
env:
43+
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
44+
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}

Makefile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ port 26383
192192
daemonize yes
193193
protected-mode no
194194
user default off
195-
user sentinel on allcommands allkeys >foobared
195+
user sentinel on allcommands allkeys allchannels >foobared
196196
sentinel monitor aclmaster 127.0.0.1 6387 1
197197
sentinel auth-user aclmaster acljedis
198198
sentinel auth-pass aclmaster fizzbuzz
@@ -463,25 +463,14 @@ release:
463463
mvn release:perform -DskipTests
464464
make stop
465465

466-
travis-install:
467-
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
468-
sudo apt-get -y update
466+
system-setup:
469467
sudo apt-get install -y gcc-8 g++-8
470468
cd /usr/bin ;\
471469
sudo ln -sf gcc-8 gcc ;\
472470
sudo ln -sf g++-8 g++
473-
[ ! -e redis-git ] && git clone https://github.com/antirez/redis.git --branch unstable --single-branch redis-git || true
471+
[ ! -e redis-git ] && git clone https://github.com/redis/redis.git --branch unstable --single-branch redis-git || true
474472
$(MAKE) -C redis-git clean
475473
$(MAKE) -C redis-git
476-
477-
circleci-install:
478-
sudo apt-get install -y gcc-8 g++-8
479-
cd /usr/bin ;\
480-
sudo ln -sf gcc-8 gcc ;\
481-
sudo ln -sf g++-8 g++
482-
[ ! -e redis-git ] && git clone https://github.com/antirez/redis.git --branch unstable --single-branch redis-git || true
483-
$(MAKE) -C redis-git clean
484-
$(MAKE) -C redis-git
485474

486475
compile-module:
487476
gcc -shared -o /tmp/testmodule.so -fPIC src/test/resources/testmodule.c

src/test/java/redis/clients/jedis/ACLJedisSentinelPoolTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public static void prepare() throws Exception {
3737

3838
@Before
3939
public void setUp() throws Exception {
40+
sentinels.clear();
4041
sentinels.add(sentinel1);
4142
}
4243

0 commit comments

Comments
 (0)