Inline ruby workflow with postgresql #1626
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |