Skip to content

Commit

Permalink
Setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mnbbrown committed Jul 4, 2023
1 parent 4a2d2e9 commit dc868a0
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
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/

0 comments on commit dc868a0

Please sign in to comment.