Skip to content

Merge pull request #213 from rubyaustralia/dependabot/npm_and_yarn/ba… #238

Merge pull request #213 from rubyaustralia/dependabot/npm_and_yarn/ba…

Merge pull request #213 from rubyaustralia/dependabot/npm_and_yarn/ba… #238

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: ruby_au
POSTGRES_PASSWORD: ruby_au
POSTGRES_DB: ruby_au_test
ports:
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 16.18.1
cache: "yarn"
- name: Install Yarn dependencies
run: |
yarn install
bundle exec rails webpacker:compile
- name: Rubocop
run: bundle exec rubocop
- name: Test
env:
DATABASE_URL: postgres://ruby_au:[email protected]:${{ job.services.postgres.ports[5432] }}/ruby_au_test
run: bundle exec rspec