Skip to content

Inline ruby workflow with postgresql #1626

Inline ruby workflow with postgresql

Inline ruby workflow with postgresql #1626

Workflow file for this run

name: audiences
on:
push:
jobs:
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:
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"