fix papertrail specs #767
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: Testing | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
if: "!contains(github.event.head_commit.message, 'ci skip')" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v1 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.5.7 | |
- name: Install PostgreSQL development dependencies | |
run: sudo apt install -y libpq-dev postgresql-client | |
- name: Setup PostrgeSQL | |
uses: harmon758/postgresql-action@v1 | |
with: | |
postgresql version: '9.6' | |
postgresql user: pek-next | |
postgresql password: pek-next | |
- name: Install bundler | |
run: gem install bundler:1.10.6 | |
- name: Restore gems cache | |
uses: actions/cache@preview | |
id: gems-cache | |
with: | |
path: vendor/ | |
key: gemset-ruby-2.5.7-${{ hashFiles('Gemfile.lock') }} | |
restore-keys: gemset-ruby-2.5.7 | |
- name: Install dependencies | |
run: bundle install --deployment | |
- name: Create database | |
run: RAILS_ENV=test bundle exec rake db:create | |
- name: Load database structure | |
run: PGPASSWORD=pek-next psql -v ON_ERROR_STOP=1 -q -U pek-next -h localhost -f /home/runner/work/pek-next/pek-next/db/structure.sql pek-next-test | |
- name: Run rspec and report to Code Climate | |
uses: paambaati/codeclimate-action@v2.6.0 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
GENERATE_TEST_COVERAGE: true | |
with: | |
coverageCommand: bundle exec rspec | |
- name: Run Minitest | |
env: | |
GENERATE_TEST_COVERAGE: true | |
run: bundle exec rake test |