Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@ name: CI
on: [push]

jobs:
build:
linters:
name: Linters
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Database
run: |
cp .github/test_db/config/database.yml config/database.yml
- name: Run Code Analysis
run: |
bundle exec rake code:analysis
tests:
name: Tests
runs-on: ubuntu-latest

services:
Expand All @@ -19,7 +38,7 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5

env:
RAILS_ENV: test
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
Expand All @@ -35,7 +54,7 @@ jobs:
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
./cc-test-reporter before-build
- name: Setup Database
run: |
cp .github/test_db/config/database.yml config/database.yml
Expand All @@ -44,11 +63,6 @@ jobs:
uses: rootstrap/check_untracked_changes@v1
with:
path: "./db/schema.rb"
- name: I18n Health
run: bundle exec i18n-tasks health
- name: Run Code Analysis
run: |
bundle exec rake code:analysis
- name: Run Tests
run: |
bundle exec rspec
Expand Down
1 change: 1 addition & 0 deletions lib/tasks/code_analysis.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ namespace :code do
sh 'bundle exec rubocop .'
sh 'bundle exec reek .'
sh 'bundle exec rails_best_practices .'
sh 'bundle exec i18n-tasks health'
end
end