mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #7103 from andrewpbrett/update-ci
Combine model jobs in CI
This commit is contained in:
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
@@ -8,7 +8,7 @@ env:
|
||||
DISABLE_KNAPSACK: true
|
||||
|
||||
jobs:
|
||||
test-non-spree-models:
|
||||
test-models:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
postgres:
|
||||
@@ -47,48 +47,7 @@ jobs:
|
||||
bundle exec rake db:schema:load RAILS_ENV=test
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec rspec spec/models --exclude-pattern "spec/models/spree/*"
|
||||
|
||||
test-spree-models:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
POSTGRES_DB: open_food_network_test
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.15.5'
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Set up application.yml
|
||||
run: cp config/application.yml.example config/application.yml
|
||||
|
||||
- name: Set up database
|
||||
run: |
|
||||
bundle exec rake db:create RAILS_ENV=test
|
||||
bundle exec rake db:schema:load RAILS_ENV=test
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec rspec spec/models/spree
|
||||
run: bundle exec rspec spec/models
|
||||
|
||||
test-admin-features:
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
Reference in New Issue
Block a user