mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
reorder jobs and move to 7 jobs
This commit is contained in:
127
.github/workflows/build.yml
vendored
127
.github/workflows/build.yml
vendored
@@ -10,6 +10,47 @@ env:
|
||||
TIMEZONE: UTC
|
||||
|
||||
jobs:
|
||||
test-controllers-and-serializers:
|
||||
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 controller tests
|
||||
run: bundle exec rspec spec/controllers spec/serializers
|
||||
|
||||
test-models:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
@@ -133,47 +174,6 @@ jobs:
|
||||
- name: Run admin feature tests
|
||||
run: bundle exec rspec --profile -- spec/features/admin/[p-z]*_spec.rb
|
||||
|
||||
test-admin-features-folders-and-controllers:
|
||||
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 admin feature tests
|
||||
run: bundle exec rspec --profile --pattern "spec/controllers/{,/*/**}/*_spec.rb,spec/features/admin/*/*_spec.rb"
|
||||
|
||||
test-consumer-features:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
@@ -215,7 +215,7 @@ jobs:
|
||||
- name: Run consumer feature tests
|
||||
run: bundle exec rspec --profile -- spec/features/consumer
|
||||
|
||||
test-other:
|
||||
test-engines-etc:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
postgres:
|
||||
@@ -257,4 +257,45 @@ jobs:
|
||||
run: RAILS_ENV=test bundle exec rake karma:run
|
||||
|
||||
- name: Run all other tests
|
||||
run: bundle exec rspec --profile --pattern "engines/*/spec/{,/*/**}/*_spec.rb,spec/{helpers, initializers, jobs, lib, mailers, queries, requests, serializers, services, validators, views}/{,/*/**}/*_spec.rb"
|
||||
run: bundle exec rspec --profile --pattern "engines/*/spec/{,/*/**}/*_spec.rb,spec/{helpers, initializers, jobs, mailers, queries, requests, services, validators, views}/{,/*/**}/*_spec.rb"
|
||||
|
||||
test-the-rest:
|
||||
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 admin feature folders, serializers, jobs, lib
|
||||
run: bundle exec rspec --profile --pattern "spec/features/admin/*/*_spec.rb,spec/lib/{,/*/**}/*_spec.rb"
|
||||
|
||||
Reference in New Issue
Block a user