Skip to content

Commit

Permalink
Migrating to GitHub Actions from CircleCI (#2975)
Browse files Browse the repository at this point in the history
Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com>
  • Loading branch information
chayim and sazzad16 authored Apr 12, 2022
1 parent 3c18734 commit a2969a4
Show file tree
Hide file tree
Showing 11 changed files with 189 additions and 254 deletions.
13 changes: 0 additions & 13 deletions .circleci.settings.xml

This file was deleted.

127 changes: 0 additions & 127 deletions .circleci/config.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---

name: Integration

on:
push:
paths-ignore:
- 'docs/**'
- '**/*.md'
- '**/*.rst'
branches:
- master
- '[0-9].[0-9]'
pull_request:
branches:
- master
- '[0-9].[0-9]'

jobs:

build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up publishing to maven central
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'
- name: stunnel
run: |
sudo apt-get update
sudo apt-get install -y stunnel make
make system-setup
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.m2/repository
/var/cache/apt
key: jedis-${{hashFiles('**/pom.xml')}}
- name: mvn offline
run: |
mvn -q dependency:go-offline
- name: run tests
run: |
TEST="" make test
env:
JVM_OPTS: -Xmx3200m
TERM: dumb
- name: redismod docker
run: docker run --name mod -p 52567:6379 -d redislabs/redismod:edge
- name: run tests
run: mvn -q -DmodulesDocker="mod:52567" -Dtest="redis.clients.jedis.modules.**" test
- name: codecov
run: |
bash <(curl -s https://codecov.io/bash)
44 changes: 44 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---

name: Publish Snapshot

on:
workflow_run:
workflows: [Integration]
types: [completed]
branches:
- master
- '[0-9].[0-9]'

jobs:

snapshot:
name: Deploy Snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up publishing to maven central
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.m2/repository
/var/cache/apt
key: jedis-${{hashFiles('**/pom.xml')}}
- name: mvn offline
run: |
mvn -q dependency:go-offline
- name: deploy
run: |
mvn --no-transfer-progress \
-DskipTests deploy
env:
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}
17 changes: 3 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ port 26383
daemonize yes
protected-mode no
user default off
user sentinel on allcommands allkeys >foobared
user sentinel on allcommands allkeys allchannels >foobared
sentinel monitor aclmaster 127.0.0.1 6387 1
sentinel auth-user aclmaster acljedis
sentinel auth-pass aclmaster fizzbuzz
Expand Down Expand Up @@ -463,25 +463,14 @@ release:
mvn release:perform -DskipTests
make stop

travis-install:
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -y update
system-setup:
sudo apt-get install -y gcc-8 g++-8
cd /usr/bin ;\
sudo ln -sf gcc-8 gcc ;\
sudo ln -sf g++-8 g++
[ ! -e redis-git ] && git clone https://github.com/antirez/redis.git --branch unstable --single-branch redis-git || true
[ ! -e redis-git ] && git clone https://github.com/redis/redis.git --branch unstable --single-branch redis-git || true
$(MAKE) -C redis-git clean
$(MAKE) -C redis-git

circleci-install:
sudo apt-get install -y gcc-8 g++-8
cd /usr/bin ;\
sudo ln -sf gcc-8 gcc ;\
sudo ln -sf g++-8 g++
[ ! -e redis-git ] && git clone https://github.com/antirez/redis.git --branch unstable --single-branch redis-git || true
$(MAKE) -C redis-git clean
$(MAKE) -C redis-git

compile-module:
gcc -shared -o /tmp/testmodule.so -fPIC src/test/resources/testmodule.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static void prepare() throws Exception {

@Before
public void setUp() throws Exception {
sentinels.clear();
sentinels.add(sentinel1);
}

Expand Down
Loading

0 comments on commit a2969a4

Please sign in to comment.