Skip to content

Commit ab13a92

Browse files
author
Alex Evanczuk
authored
Set up CI and CD, using packs-rails as a model (#3)
* set up CI and CD * bump version * do not test against ruby head for now... issues with nokogiri
1 parent d845508 commit ab13a92

File tree

4 files changed

+57
-3
lines changed

4 files changed

+57
-3
lines changed

.github/workflows/cd.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CD
2+
3+
on:
4+
workflow_run:
5+
workflows: [CI]
6+
types: [completed]
7+
branches: [main]
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
12+
steps:
13+
- uses: actions/checkout@8230315d06ad95c617244d2f265d237a1682d445
14+
- name: Tag and Push Gem
15+
id: tag-and-push-gem
16+
uses: discourse/publish-rubygems-action@04549cca4eecd343acd215114ebbbdb99630af90
17+
env:
18+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19+
GIT_EMAIL: ${{secrets.ALEX_GIT_EMAIL}}
20+
GIT_NAME: ${{secrets.ALEX_GIT_NAME}}
21+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
22+
- name: Create GitHub Release
23+
run: gh release create v${{steps.tag-and-push-gem.outputs.gem_version}} --generate-notes
24+
if: ${{ steps.tag-and-push-gem.outputs.new_version == 'true' }}
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
rspec:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
ruby:
11+
- 2.7
12+
# See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions
13+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
14+
- '3.0'
15+
- 3.1
16+
env:
17+
BUNDLE_GEMFILE: Gemfile
18+
name: "RSpec tests: Ruby ${{ matrix.ruby }}"
19+
steps:
20+
- uses: actions/checkout@8230315d06ad95c617244d2f265d237a1682d445
21+
- name: Set up Ruby ${{ matrix.ruby }}
22+
uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
23+
with:
24+
bundler-cache: true
25+
ruby-version: ${{ matrix.ruby }}
26+
- name: Run tests
27+
run: bundle exec rspec

Gemfile.lock

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
bigrails-redis (0.7.0)
4+
bigrails-redis (0.7.1)
55
activesupport (>= 6)
66
railties (>= 6)
77
redis (>= 4)
@@ -111,6 +111,7 @@ GEM
111111
zeitwerk (2.5.4)
112112

113113
PLATFORMS
114+
arm64-darwin-20
114115
arm64-darwin-21
115116
x86_64-darwin-21
116117
x86_64-linux
@@ -125,4 +126,4 @@ DEPENDENCIES
125126
standard
126127

127128
BUNDLED WITH
128-
2.2.32
129+
2.4.12

lib/big_rails/redis/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module BigRails
44
module Redis
5-
VERSION = "0.7.0"
5+
VERSION = "0.7.1"
66
end
77
end

0 commit comments

Comments
 (0)