fix rubocop issues #1268
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: RSpec | |
on: push | |
jobs: | |
rspec: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install OS Packages | |
uses: mstksg/get-package@v1 | |
with: | |
apt-get: libsodium23 | |
brew: libsodium | |
- uses: wbari/[email protected] | |
with: | |
mongoDBVersion: '4.2' | |
- name: Boot RabbitMQ | |
run: | | |
sudo apt-get update | |
sudo apt-get install rabbitmq-server | |
sudo rabbitmqctl add_vhost event_source | |
sudo rabbitmqctl set_permissions -p event_source guest ".*" ".*" ".*" | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.3 | |
- uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: v2-${{ runner.os }}-gems-fdsh_gateway-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/Gemfile' ) }} | |
restore-keys: | | |
v2-${{ runner.os }}-gems-fdsh_gateway-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/Gemfile' ) }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '14.x' | |
- name: Restore Node Modules | |
id: npm-cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_v14_modules-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node_v14_modules-${{ hashFiles('yarn.lock') }} | |
- name: Install node dependencies | |
if: steps.npm-cache.outputs.cache-hit != 'true' | |
run: yarn install | |
- name: bundle install | |
run: | | |
bundle config path vendor/bundle | |
bundle install | |
- name: Compile assets | |
if: steps.assets-cache.outputs.cache-hit != 'true' | |
run: bundle exec rails assets:precompile | |
- name: run rubocop | |
run: | | |
bundle exec rubocop | |
- name: run tests | |
run: | | |
bundle exec rspec |