34 lines
731 B
YAML
34 lines
731 B
YAML
name: CI Pipeline
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
push:
|
|
branches:
|
|
- main
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
jobs:
|
|
build:
|
|
runs-on: ruby-latest
|
|
env:
|
|
RAILS_ENV: test
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Cache Ruby gems
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor/bundle
|
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gems-
|
|
|
|
- name: Install Ruby dependencies
|
|
run: bundle install --path vendor/bundle
|
|
|
|
- name: Run tests and linting
|
|
run: bundle exec rake
|