Skip to content

Commit

Permalink
Inline ruby workflow with postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
xjunior committed May 9, 2024
1 parent 6778bae commit ce1516d
Showing 1 changed file with 55 additions and 14 deletions.
69 changes: 55 additions & 14 deletions .github/workflows/audiences.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,60 @@ name: audiences

on:
push:

jobs:
ruby:
uses: powerhome/github-actions-workflows/.github/workflows/ruby-gem.yml@main
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}
strategy:
fail-fast: false
matrix:
ruby:
- 3.0
- 3.1
- 3.2
- 3.3
gemfile:
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile
exclude:
- ruby: 3.2
gemfile: gemfiles/rails_6_1.gemfile
- ruby: 3.3
gemfile: gemfiles/rails_6_1.gemfile
env:
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
BUNDLER_VERSION: 2
RAILS_ENV: test
steps:
- uses: actions/checkout@v3
- name: Install non-ruby dependencies
run: sudo apt-get install libpq-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
bundler: 2
ruby-version: ${{ matrix.ruby }}
working-directory: audiences
- name: Run the build script
working-directory: audiences
run: bundle exec rake

license-compliance:
uses: powerhome/github-actions-workflows/.github/workflows/license-compliance.yml@main
with:
package: ${{ github.workflow }}
workdir: ${{ github.workflow }}
before_build: sudo /etc/init.d/mysql start
gemfiles: "['gemfiles/rails_6_1.gemfile','gemfiles/rails_7_0.gemfile','gemfiles/rails_7_1.gemfile']"
ruby: '["3.0","3.1","3.2","3.3"]'
exclude: |-
[
{ 'ruby': '3.2', 'gemfile': 'gemfiles/rails_6_1.gemfile'},
{ 'ruby': '3.3', 'gemfile': 'gemfiles/rails_6_1.gemfile'},
]
secrets: inherit
workdir: "audiences"

release:
needs: [build, license-compliance]
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'refs/tags/v') && contains(github.ref, 'audiences') }}
steps:
- uses: actions/checkout@v3
- uses: cadwallion/publish-rubygems-action@master
env:
RELEASE_COMMAND: rake build release:guard_clean release:rubygem_push
RUBYGEMS_API_KEY: ${{ secrets.rubygems_api_key }}
WORKDIR: "audiences"

0 comments on commit ce1516d

Please sign in to comment.