Skip to content

Merge pull request #241 from unboxed/dependabot/bundler/pry-0.15.0 #93

Merge pull request #241 from unboxed/dependabot/bundler/pry-0.15.0

Merge pull request #241 from unboxed/dependabot/bundler/pry-0.15.0 #93

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
bundle-audit:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: Install packages
run: |
npm install --no-fund --no-audit
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Check bundle for known CVEs
run: |
bundle exec bundle-audit check --update
brakeman:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: Install packages
run: |
npm install --no-fund --no-audit
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Analyse code for vulnerabilities
run: |
bundle exec brakeman --no-pager
rubocop:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: Install packages
run: |
npm install --no-fund --no-audit
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Lint source code with rubocop
run: |
bundle exec rubocop
rspec:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:16
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: Install packages
run: |
npm install --no-fund --no-audit
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Setup test database
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
RAILS_ENV: test
run: |
bundle exec rake db:create db:schema:load
- name: Compile assets
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
RAILS_ENV: test
run: |
bundle exec rake assets:precompile
- name: Run rspec specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
RAILS_ENV: test
run: |
bundle exec rspec
cucumber:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:16
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: Install packages
run: |
npm install --no-fund --no-audit
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Setup test database
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
RAILS_ENV: test
run: |
bundle exec rake db:create db:schema:load
- name: Compile assets
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
RAILS_ENV: test
run: |
bundle exec rake assets:precompile
- name: Run cucumber specs
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
RAILS_ENV: test
run: |
bundle exec cucumber