Skip to content

Commit

Permalink
Merge pull request #13 from qonto/github-actions
Browse files Browse the repository at this point in the history
Switch to github actions
  • Loading branch information
MaximeD authored Jun 5, 2023
2 parents 4c098e2 + 1d81cd0 commit 47be649
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 39 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/ruby.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/rubygems.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Ruby Gem

on:
push:
tags:
- '*'

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![Gem Version](https://badge.fury.io/rb/activejob-traceable.svg) ![CI Status](https://github.com/qonto/activejob-traceable/actions/workflows/tests.yml/badge.svg)

# ActiveJob::Traceable

Patches ActiveJob to add attribute `tracing_info`, which is added as log's tag.
Expand Down Expand Up @@ -47,7 +49,7 @@ Once configured, works out of the box.

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, make sure you updated the version number in `version.rb`, and then create a new release and tag from github.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion lib/activejob/traceable/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module ActiveJob
module Traceable
VERSION = '0.3.6'
VERSION = '0.4.0'
end
end

0 comments on commit 47be649

Please sign in to comment.