无法在Github Actions上使用Webpack构建Rails

我试图在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

我在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.

我该如何解决?

编辑:

这是来自webpack的日志: https://gist.github.com/MatUrbanski/bca6f191694dea60437244c1bcb5b653

litao7777 回答:无法在Github Actions上使用Webpack构建Rails

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3125062.html

大家都在问