Skip to content

Upgrade to Debian Stable and Ruby 3.2 #423

Upgrade to Debian Stable and Ruby 3.2

Upgrade to Debian Stable and Ruby 3.2 #423

Workflow file for this run

name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
RUBY_VERSION: "3.2"
OS_VERSION: "ubuntu-24.04"
jobs:
bundle-audit:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Check bundle for known CVEs
run: |
bundle exec rake bundle:audit
brakeman:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Analyse code for vulnerabilities
run: |
bundle exec rake brakeman:check
spec-admin-controllers:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
SPEC_OPTS: "-f doc -P spec/controllers/admin/*_spec.rb"
run: |
bundle exec rake spec:controllers
spec-public-controllers:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
SPEC_OPTS: "-f doc -P spec/controllers/*_spec.rb"
run: |
bundle exec rake spec:controllers
spec-jobs:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
SPEC_OPTS: "-f doc -P spec/jobs/**/*_spec.rb"
run: |
bundle exec rake spec:jobs
spec-mailers:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
SPEC_OPTS: "-f doc -P spec/mailers/**/*_spec.rb"
run: |
bundle exec rake spec
spec-models:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
SPEC_OPTS: "-f doc -P spec/models/**/*_spec.rb"
run: |
bundle exec rake spec
spec-requests:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
SPEC_OPTS: "-f doc -P spec/{requests,routing}/**/*_spec.rb"
run: |
bundle exec rake spec
spec-other:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
SPEC_OPTS: "-f doc -P spec/{helpers,lib,presenters,tasks,validators,views}/**/*_spec.rb"
run: |
bundle exec rake spec
javascript:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Run javascript specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
run: |
bundle exec rake jasmine:ci
cucumber-admin:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Save screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: selenium-screenshots-admin
path: ${{ github.workspace }}/tmp/capybara/*.png
retention-days: 7
if-no-files-found: ignore
- name: Save rails logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: rails-logs-admin
path: ${{ github.workspace }}/log/test.log
retention-days: 7
if-no-files-found: ignore
- name: Run cucumber specs
env:
CUCUMBER_FORMAT: pretty
CUCUMBER_OPTS: "--tags @admin --profile default"
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
run: |
bundle exec rake cucumber
cucumber-public:
runs-on: $OS_VERSION
services:
postgres:
image: postgres:12
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
memcached:
image: memcached:1.5
ports: ["11211:11211"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "$RUBY_VERSION"
- name: Setup gem cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: $OS_VERSION-gems-${{ hashFiles('/Gemfile.lock') }}
restore-keys: |
$OS_VERSION-gems-
- name: Setup
uses: ./.github/actions/setup
- name: Save screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: selenium-screenshots-public
path: ${{ github.workspace }}/tmp/capybara/*.png
retention-days: 7
if-no-files-found: ignore
- name: Save rails logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: rails-logs-public
path: ${{ github.workspace }}/log/test.log
retention-days: 7
if-no-files-found: ignore
- name: Run cucumber specs
env:
CUCUMBER_FORMAT: pretty
CUCUMBER_OPTS: "--tags 'not @admin' --profile default"
DATABASE_URL: postgres://postgres:postgres@localhost:5432/epets_test
RAILS_ENV: test
run: |
bundle exec rake cucumber