Skip to content

chore: Node package format requires that CommonJS files in a type mod… #1146

chore: Node package format requires that CommonJS files in a type mod…

chore: Node package format requires that CommonJS files in a type mod… #1146

Workflow file for this run

name: CI Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
RAILS_ENV: test
PGHOST: localhost
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
services:
postgres:
image: postgres:14
env:
POSTGRES_DB: ${{ env.POSTGRES_DB }} # if this is not set, then the value of POSTGRES_USER will be used
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} # required
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
- name: Prepare database
run: bundle exec rails db:schema:load
- name: Install node dependencies
run: npm ci
- name: Precompile assets
run: bundle exec rake assets:precompile
- name: Run unit tests
run: bundle exec rails test
- name: Set up Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- name: Run system tests
run: HEADLESS=1 bundle exec rails test:system