Skip to content

Update readme docs #294

Update readme docs

Update readme docs #294

Workflow file for this run

name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
environment: test
services:
db:
image: postgres:11
env:
POSTGRES_USER: wrp
POSTGRES_PASSWORD: dev
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile
BUNDLE_BUILD__SASSC: "--disable-march-tune-native"
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Ruby & Bundle Install
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 10.13.0
- name: Configure Yarn Cache Location
id: cache-locations
run: |
echo "yarn_dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Check Yarn Cache
id: cache-yarn
uses: actions/cache@v3
with:
path: ${{ steps.cache-locations.outputs.yarn_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Javascript Packages
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: |
yarn install --pure-lockfile
- name: Create Database
env:
POSTGRES_TEST_DB: wetrockpolice_test
POSTGRES_USER: wrp
POSTGRES_PASSWORD: dev
POSTGRES_HOST: localhost
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: |
bundle exec rake db:create
bundle exec rake db:migrate
- name: Run Tests
env:
POSTGRES_TEST_DB: wetrockpolice_test
POSTGRES_USER: wrp
POSTGRES_PASSWORD: dev
POSTGRES_HOST: localhost
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
bundle exec rails test