Skip to content
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

Setup github actions #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish gem to GitHub package registry

on:
push:
tags:
- v*

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: gocardless/github-actions/shared/actions/ruby-bundle-install@master
with:
known_hosts: ${{ secrets.KNOWN_HOSTS_GITHUB_KEY }}
robot_ssh_key: ${{ secrets.ROBOT_READONLY_SSH_KEY }}
token: ${{ secrets.ROBOT_READONLY_PACKAGE_READER }}
- name: Publish Gem
uses: gocardless/github-actions/shared/actions/publish-internal-gem@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
known_hosts: ${{ secrets.KNOWN_HOSTS_GITHUB_KEY }}
robot_ssh_key: ${{ secrets.ROBOT_READONLY_SSH_KEY }}
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: tests
on: push

jobs:
test_and_lint:
runs-on: ubuntu-latest
strategy:
matrix:
ruby_version:
- '2.6'
- '2.7'
- '3.0'
steps:
- uses: actions/[email protected]
- uses: gocardless/github-actions/shared/actions/ruby-bundle-install@master
with:
known_hosts: ${{ secrets.KNOWN_HOSTS_GITHUB_KEY }}
robot_ssh_key: ${{ secrets.ROBOT_READONLY_SSH_KEY }}
token: ${{ secrets.ROBOT_READONLY_PACKAGE_READER }}
ruby_version: ${{ matrix.ruby_version }}
- name: Run specs
run: RUBYOPT="-W0" bundle exec rspec --format progress --format RSpec::Github::Formatter -o /tmp/rspec.xml
- name: Rubocop
run: bundle exec rubocop --extra-details --display-style-guide --parallel --force-exclusion
- uses: actions/upload-artifact@v2
if: failure()
with:
path: /tmp/ci_artifacts/