Я пытаюсь собрать Ruby on Rails с Webpack на Github Actions. Моя конфигурация yml выглядит следующим образом:
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:11
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v1
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 10.13.0
- uses: borales/actions-yarn@v2.0.0
with:
cmd: install
- name: Install dependencies
run: |
sudo apt-get -yqq install libpq-dev postgresql-client
gem install bundler
yarn install
- name: Bundle install
run: bundle install --jobs 4 --retry 3
- name: Rubocop check
run: bundle exec rubocop
- name: Brakerman check
run: bundle exec brakeman
- name: Webpack compilation
run: NODE_ENV=test bundle exec rails webpacker:compile
- name: Build and run tests
env:
DATABASE_URL: postgres://postgres:@localhost:5432/test
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: |
bundle exec rails db:prepare
bundle exec rspec
У меня проблема с шагом NODE_ENV=test bundle exec rails webpacker:compile
, возвращается следующая ошибка:
Run NODE_ENV=test bundle exec rails webpacker:compile
Compiling…
Compilation failed:
##[error]Process completed with exit code 1.
Как это исправить?
РЕДАКТИРОВАТЬ:
Вот журнал из веб-пакета: https://gist.github.com/MatUrbanski/bca6f191694dea60437244c1bcb5b653