Skip to content

add github actions #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
changelog:
exclude:
labels: [dependencies]
authors: [renovate-bot]
categories:
- title: Breaking Changes
labels: [breaking]
- title: New Features
labels: [enhancement]
- title: Bug Fixes
labels: [bug]
- title: Other Changes
labels: ["*"]
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI
on:
push:
branches-ignore: [master]
tags-ignore: [v*]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: "test (ruby: ${{ matrix.ruby }}, redis.rb: ${{ matrix.redis }})"
runs-on: ubuntu-latest
continue-on-error: ${{ contains(matrix.ruby, 'head') }}
strategy:
fail-fast: false
matrix:
ruby:
- "2.7"
- "3.0"
- "3.1"
# - 'head'
- "jruby"
# - 'jruby-head'
- "truffleruby"
# - 'truffleruby-head'
redis:
- 4_0_x
- 4_1_x
- 4_x
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/redis_${{ matrix.redis }}.gemfile
services:
redis:
image: redis
ports:
- 6379:6379
distributed1:
image: redis
ports:
- 6380:6380
distributed2:
image: redis
ports:
- 6381:6381
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- run: bundle exec rake lint
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish
on:
push:
tags: [v*]
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- run: |
mkdir -p ~/.gem
cat << EOF > ~/.gem/credentials
---
:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
EOF

chmod 0600 ~/.gem/credentials
- run: bundle exec rake release
- uses: softprops/action-gh-release@v1
with:
files: "*.gem"
generate_release_notes: true
prerelease: ${{ contains(github.ref, '.pre') }}
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.