Skip to content

Commit

Permalink
Use shared config for ci,cd github workflow
Browse files Browse the repository at this point in the history
Co-authored-by: Ashley Willard <[email protected]>
Co-authored-by: Joey Schoblaska <[email protected]>
Co-authored-by: Teal Stannard <[email protected]>
  • Loading branch information
4 people committed Mar 22, 2024
1 parent 6baf2e0 commit c2e1970
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 69 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,5 @@ on:
types: [completed]
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Tag and Push Gem
id: tag-and-push-gem
uses: discourse/publish-rubygems-action@v2
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GIT_EMAIL: ${{secrets.GUSTO_GIT_EMAIL}}
GIT_NAME: ${{secrets.GUSTO_GIT_NAME}}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
- name: Create GitHub Release
run: gh release create v${{steps.tag-and-push-gem.outputs.gem_version}} --generate-notes
if: ${{ steps.tag-and-push-gem.outputs.new_version == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
call-workflow-from-shared-config:
uses: rubyatscale/shared-config/github/workflows/cd.yml@main
53 changes: 2 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,5 @@ name: CI
on: [push, pull_request]

jobs:
rspec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- 2.7
# See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
- '3.0'
- 3.1
- 3.2
- 3.3
- head
env:
BUNDLE_GEMFILE: Gemfile
name: "RSpec tests: Ruby ${{ matrix.ruby }}"
steps:
- uses: actions/checkout@v4
- name: Install ripgrep
run: sudo apt-get install -y ripgrep
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Run tests
run: bundle exec rspec
static_type_check:
name: "Type Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: head
- name: Run static type checks
run: bundle exec srb tc
rubocop:
runs-on: ubuntu-latest
name: Rubocop
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: head
- name: Run style checks
run: bundle exec rubocop
call-workflow-from-shared-config:
uses: rubyatscale/shared-config/github/workflows/ci.yml@main

0 comments on commit c2e1970

Please sign in to comment.