Skip to content

add schema fix

add schema fix #202

Workflow file for this run

name: build
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
env:
CCTR: ./cc-test-reporter
BUNDLE_WITHOUT: production
BUNDLE_BUILD__NOKOGIRI: --use-system-libraries
TZ: America/Los_Angeles
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: install libxslt
run: |
sudo apt-get install -y libxslt-dev
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
bundler-cache: false
- name: create test database and secrets file
run: |
gpg --pinentry-mode loopback --batch --passphrase "${{ secrets.GPG_SYMMETRIC_KEY }}" -d -o config/application.yml config/application.yml.asc
cp config/database.yml.test config/database.yml
- name: Setup CodeClimate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR
chmod +x $CCTR
$CCTR before-build
- name: install gems
run: |
bundle install --without production
- name: Install Chrome For Testing and Chromedriver
uses: browser-actions/setup-chrome@v1
id: install-chromedriver
with:
chrome-version: stable
install-chromedriver: true
install-dependencies: true
- name: run Cucumber tests and capture coverage
env:
CHROMEDRIVER_PATH: ${{ steps.install-chromedriver.outputs.chromedriver-path }}
CHROME_FOR_TESTING_PATH: ${{ steps.install-chromedriver.outputs.chrome-path }}
run: |
bundle exec cucumber --retry 2 2>/dev/null
$CCTR format-coverage --output coverage/codeclimate.$SUITE.json --input-type simplecov
- name: run RSpec tests and capture coverage
run: |
bundle exec rspec
$CCTR format-coverage --output coverage/codeclimate.$SUITE.json --input-type simplecov
- name: Publish code coverage
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
$CCTR sum-coverage coverage/codeclimate.*.json
$CCTR upload-coverage --id ${{ secrets.CC_TEST_REPORTER_ID }}
$CCTR after-build --id ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}