mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
based on https://docs.github.com/en/actions/guides/building-and-testing-ruby#starting-with-the-ruby-workflow-template. Things worth mentioning: * ruby/setup-ruby reads `.ruby-version` by default. See: https://github.com/ruby/setup-ruby#supported-version-syntax * I chose to run on ubuntu-18.04 because that's what we use in production. This should reduce potential "it runs on machine but fails in CI" due to different system libraries versions and such. We're temporarily running only `spec/queries/` specs because we want it to finish quickly as we iterate on its configuration.
29 lines
813 B
YAML
29 lines
813 B
YAML
# This workflow uses actions that are not certified by GitHub.
|
|
# They are provided by a third-party and are governed by
|
|
# separate terms of service, privacy policy, and support
|
|
# documentation.
|
|
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
|
|
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ $default-branch ]
|
|
pull_request:
|
|
branches: [ $default-branch ]
|
|
|
|
jobs:
|
|
test:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
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
|
|
- name: Run tests
|
|
run: bundle exec rspec spec/queries
|