move I18n Health check to code:analysis #293
Workflow file for this run
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: [push] | |
jobs: | |
linters: | |
name: Linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run Code Analysis | |
run: | | |
bundle exec rake code:analysis | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:9.4 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_HOST_AUTH_METHOD: trust | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
RAILS_ENV: test | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Setup Code Climate test-reporter | |
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 | |
- name: Setup Database | |
run: | | |
cp .github/test_db/config/database.yml config/database.yml | |
bundle exec rails db:create db:migrate | |
- name: Check for untracked changes in schema.rb | |
uses: rootstrap/check_untracked_changes@v1 | |
with: | |
path: "./db/schema.rb" | |
- name: Run Tests | |
run: | | |
bundle exec rspec | |
- name: Check for missing annotations | |
run: bundle exec annotate | |
- name: Check for untracked changes in app and spec directories | |
uses: rootstrap/check_untracked_changes@v1 | |
with: | |
path: "./app/ ./spec/" | |
- name: Report to CodeClimate | |
run: | | |
./cc-test-reporter after-build --exit-code 0 |