Mat*_*ski 6 continuous-integration ruby-on-rails webpack github-actions
我正在尝试在 Github Actions 上使用 Webpack 构建 Ruby on Rails,我的 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
Run Code Online (Sandbox Code Playgroud)
我的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.
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
编辑:
这是 webpack 的日志:https ://gist.github.com/MatUrbanski/bca6f191694dea60437244c1bcb5b653
| 归档时间: |
|
| 查看次数: |
668 次 |
| 最近记录: |