Skip to content

Merge pull request #257 from beautyjoy/dependabot/npm_and_yarn/semver… #627

Merge pull request #257 from beautyjoy/dependabot/npm_and_yarn/semver…

Merge pull request #257 from beautyjoy/dependabot/npm_and_yarn/semver… #627

Workflow file for this run

name: All Specs
on: [push, pull_request]
jobs:
specs:
name: CI
runs-on: ubuntu-latest
continue-on-error: true
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
strategy:
matrix:
suite: [cucumber, rspec]
env:
DB_USER: postgres
TZ: America/Los_Angeles
RAILS_ENV: test
RUBY_ENV: test
DISPLAY: ':99' # For chromedriver
CCTR: ./cc-test-reporter
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.17.0'
- name: Use Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- name: Setup Code Climate
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR
chmod +x $CCTR
$CCTR before-build
- run: bin/yarn
- run: bin/rails webpacker:compile
- run: bundle exec rake db:setup
- run: bundle exec rake db:migrate
- name: Run ${{ matrix.suite }}
run: |
bundle exec ${{ matrix.suite }}
$CCTR format-coverage --output coverage/codeclimate.${{ matrix.suite }}.json --input-type simplecov
- name: CodeCov Coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Publish Code Climate
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
$CCTR sum-coverage coverage/codeclimate.*.json
$CCTR upload-coverage --id $CC_TEST_REPORTER_ID