Skip to content

Update to Rails 8.1, Ruby 3.4 #341

Update to Rails 8.1, Ruby 3.4

Update to Rails 8.1, Ruby 3.4 #341

Workflow file for this run

name: Build / Test / Push
on:
push:
branches:
- '**'
workflow_dispatch:
jobs:
docker-build:
uses: BerkeleyLibrary/.github/.github/workflows/docker-build.yml@v2.0.0
with:
image: ghcr.io/${{ github.repository }}
secrets: inherit
test:
runs-on: ubuntu-latest
needs:
- docker-build
container:
image: ${{ needs.docker-build.outputs.image }}
defaults:
run:
working-directory: /opt/app
services:
db:
image: postgres
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
steps:
- name: Run tests
env:
RAILS_ENV: test
run: bundle exec rake check -t
- name: Run style checks
run: bundle exec rubocop
- name: Validate database migrations
env:
RAILS_ENV: production
SECRET_KEY_BASE: dummy_test_secret_key_base
DISABLE_DATABASE_ENVIRONMENT_CHECK: 1
run: bundle exec rails --trace db:drop db:create db:migrate
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: artifacts
path: artifacts/**
push:
needs:
- docker-build
- test
uses: BerkeleyLibrary/.github/.github/workflows/docker-push.yml@v2.0.0
with:
image: ghcr.io/${{ github.repository }}
build-image-arm64: ${{ needs.docker-build.outputs.image-arm64 }}
build-image-x64: ${{ needs.docker-build.outputs.image-x64 }}
secrets: inherit