Update rails requirement from ~> 7.2.1 to ~> 8.0.0 #10
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: CI | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
jobs: | |
scan_ruby: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
bundler-cache: true | |
- name: Scan for common Rails security vulnerabilities using static analysis | |
run: bin/brakeman --no-pager | |
scan_js: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
bundler-cache: true | |
- name: Scan for security vulnerabilities in JavaScript dependencies | |
run: bin/importmap audit | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
bundler-cache: true | |
- name: Lint code for consistent style | |
run: bin/rubocop -f github | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
steps: | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y -V \ | |
curl \ | |
google-chrome-stable \ | |
libgirepository1.0-dev \ | |
libjemalloc2 \ | |
libwebkit2gtk-4.1-dev | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Enable additional decomposors | |
run: cp -a Gemfile.local{.example,} | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
run: bin/rails test | |
- name: Keep screenshots from failed system tests | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: screenshots | |
path: ${{ github.workspace }}/tmp/screenshots | |
if-no-files-found: ignore |