Skip to content

Update dependency rubocop to v1.69.2 #1169

Update dependency rubocop to v1.69.2

Update dependency rubocop to v1.69.2 #1169

name: audiences-ruby
on:
push:
jobs:
brakeman:
name: Security Analysis
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.3.5
working-directory: audiences
- name: Brakeman
uses: reviewdog/action-brakeman@v2
with:
workdir: audiences
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}
env:
DATABASE_USER: dbuser
DATABASE_PASS: dbpass
DATABASE_HOST: 127.0.0.1
strategy:
fail-fast: false
matrix:
ruby:
- 3.0.7
- 3.3
gemfile:
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile
exclude:
- ruby: 3.3
gemfile: gemfiles/rails_6_1.gemfile
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: ${{ env.DATABASE_USER }}
POSTGRES_PASSWORD: ${{ env.DATABASE_PASS }}
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:latest
env:
MYSQL_USER: ${{ env.DATABASE_USER }}
MYSQL_PASSWORD: ${{ env.DATABASE_PASS }}
MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install non-ruby dependencies
run: sudo apt-get install libpq-dev
- name: 'mysql2 adapter'
uses: powerhome/github-actions-workflows/build-ruby-gem@main
env:
DATABASE_ADAPTER: mysql2
DATABASE_PORT: 3306
with:
workdir: audiences
ruby: ${{ matrix.ruby }}
gemfile: ${{ matrix.gemfile }}
- name: 'postgresql adapter'
uses: powerhome/github-actions-workflows/build-ruby-gem@main
env:
DATABASE_ADAPTER: postgresql
DATABASE_PORT: 5432
with:
workdir: audiences
ruby: ${{ matrix.ruby }}
gemfile: ${{ matrix.gemfile }}
license-compliance:
uses: powerhome/github-actions-workflows/.github/workflows/license-compliance.yml@main
with:
workdir: audiences
all:
if: ${{ always() }}
runs-on: ubuntu-latest
name: All
needs: [build, license-compliance]
steps:
- run: |
result="${{ needs.build.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi
release:
needs: [build, license-compliance]
runs-on: ubuntu-latest
if: ${{ contains(github.ref, 'refs/tags/v') && contains(github.ref, 'audiences-ruby') }}
steps:
- uses: actions/checkout@v4
- 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