@@ -105,36 +105,37 @@ jobs:
105105 with :
106106 node-version : ${{ matrix.node }}
107107 - name : Setup NPM Cache
108- if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' }}
108+ if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' && !contains(matrix.task, 'seed') }}
109109 uses : actions/cache@v3
110110 with :
111111 path : ~/.npm
112112 key : ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package.json') }}
113113 restore-keys : |
114114 ${{ runner.os }}-node-${{ matrix.node }}-
115115 - name : " Build package-lock.json"
116- if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' }}
116+ if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' && !contains(matrix.task, 'seed') }}
117117 run : bundle exec npm install --package-lock-only --no-audit
118118 - name : Archive package-lock.json
119- if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' }}
119+ if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' && !contains(matrix.task, 'seed') }}
120120 uses : actions/upload-artifact@v3
121121 with :
122122 name : package-lock-ruby-${{ matrix.ruby }}-node-${{ matrix.node }}-pg-${{ matrix.postgresql }}.json
123123 path : package-lock.json
124124 - name : " Install NPM packages"
125- if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' }}
125+ if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' && !contains(matrix.task, 'seed') }}
126126 run : bundle exec npm ci --no-audit
127127 - name : Prepare test env
128+ if : ${{ !contains(matrix.task, 'nulldb') }}
128129 run : |
129130 bundle exec rake db:create
130131 bundle exec rake db:migrate
131132 - name : " Compile webpack"
132- if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' }}
133+ if : ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' && contains(matrix.task, 'test') }}
133134 run :
134135 bundle exec rake webpack:compile
135136 - name : Add nulldb DB schema
136137 run : cp -f db/schema.rb.nulldb db/schema.rb
137- if : contains(matrix.task, 'precompile')
138+ if : ${{ contains(matrix.task, 'nulldb') }}
138139 - name : Run rake ${{ matrix.task }}
139140 run : bundle exec rake ${{ matrix.task }}
140141
0 commit comments