chore: remove unneeded gems #734
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 | |
- pull_request | |
jobs: | |
linters: | |
name: Linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: 3.2.2 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Install packages | |
run: | | |
yarn | |
- name: Install submodules | |
run: | | |
git submodule update --init | |
- name: Run linters | |
run: | | |
bundle exec rubocop --parallel | |
yarn eslint . --ext js,ts | |
- name: Run security checks | |
run: | | |
bundle exec bundler-audit --update | |
bundle exec brakeman -q -w2 | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:12.7 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: ["5432:5432"] | |
options: >- | |
--mount type=tmpfs,destination=/var/lib/postgresql/data | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: --entrypoint redis-server | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: 3.2.2 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Install packages | |
run: | | |
yarn install | |
- name: Install submodules | |
run: | | |
git submodule update --init | |
- name: Install packages | |
run: | | |
yarn build | |
yarn build:css | |
- name: Setup test database and run tests | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
run: | | |
RAILS_ENV=test bin/rails db:drop | |
RAILS_ENV=test bin/rails db:create | |
RAILS_ENV=test bin/rails db:schema:load | |
RAILS_ENV=test bundle exec rspec | |
- name: Print test log if rspec fails | |
if: failure() | |
run: cat log/test.log | |
- name: Create Coverage Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage | |
path: coverage/ | |
- name: Simplecov Report | |
uses: aki77/simplecov-report-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |