Mongoid8 #1134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: Ruby | |
on: | |
push: | |
branches: | |
- master | |
- cypress_v5 | |
- cypress_v6 | |
- cypress_v7 | |
pull_request: | |
branches: | |
- master | |
- cypress_v5 | |
- cypress_v6 | |
- cypress_v7 | |
jobs: | |
audit: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
# uses: ruby/setup-ruby@b12138f02d7d0c4d36f463e0885dc47ec25a52fe | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
bundle install | |
- name: Bundle audit check | |
run: | | |
bundle exec bundle-audit check --update | |
overcommit: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
# uses: ruby/setup-ruby@b12138f02d7d0c4d36f463e0885dc47ec25a52fe | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
. $HOME/.nvm/nvm.sh | |
nvm install 16.19 | |
nvm use stable | |
bundle install | |
- name: Run overcommit | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Travis CI" | |
sudo npm install -g eslint | |
bundle exec overcommit --sign | |
bundle exec overcommit --run | |
cucumber-1: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
# uses: ruby/setup-ruby@b12138f02d7d0c4d36f463e0885dc47ec25a52fe | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
. $HOME/.nvm/nvm.sh | |
nvm install 16.19 | |
nvm use stable | |
bundle install | |
git clone -b cypress_v6 https://github.com/projectcypress/cqm-execution-service.git /tmp/cqm-execution-service | |
yarn --cwd /tmp/cqm-execution-service install --only=production | |
yarn --cwd /tmp/cqm-execution-service start & | |
git clone -b cypress_v7 https://github.com/projecttacoma/cqm-execution-service.git /tmp/cqm-execution-service-56 | |
yarn --cwd /tmp/cqm-execution-service-56 install --only=production | |
yarn --cwd /tmp/cqm-execution-service-56 start & | |
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.18.tgz -O /tmp/mongodb.tgz | |
tar -xvf /tmp/mongodb.tgz | |
mkdir /tmp/data | |
${PWD}/mongodb-linux-x86_64-4.0.18/bin/mongod --setParameter cursorTimeoutMillis=3600000 --setParameter maxBSONDepth=500 --dbpath /tmp/data --bind_ip 127.0.0.1 &> /dev/null & | |
cp ./.travis/mongoid.yml ./config/mongoid.yml | |
- name: Run cucumber | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 30 | |
max_attempts: 2 | |
retry_on: error | |
command: bundle exec cucumber features/admin/ features/checklist_tests/ features/filtering_tests/ features/measure_tests/ features/multi_measure_tests/; | |
- name: Upload code coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: coverage | |
name: codecov-cucumber-1 | |
cucumber-2: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
# uses: ruby/setup-ruby@b12138f02d7d0c4d36f463e0885dc47ec25a52fe | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
. $HOME/.nvm/nvm.sh | |
nvm install 16.19 | |
nvm use stable | |
bundle install | |
git clone -b cypress_v6 https://github.com/projectcypress/cqm-execution-service.git /tmp/cqm-execution-service | |
yarn --cwd /tmp/cqm-execution-service install --only=production | |
yarn --cwd /tmp/cqm-execution-service start & | |
git clone -b cypress_v7 https://github.com/projecttacoma/cqm-execution-service.git /tmp/cqm-execution-service-56 | |
yarn --cwd /tmp/cqm-execution-service-56 install --only=production | |
yarn --cwd /tmp/cqm-execution-service-56 start & | |
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.18.tgz -O /tmp/mongodb.tgz | |
tar -xvf /tmp/mongodb.tgz | |
mkdir /tmp/data | |
${PWD}/mongodb-linux-x86_64-4.0.18/bin/mongod --setParameter cursorTimeoutMillis=3600000 --setParameter maxBSONDepth=500 --dbpath /tmp/data --bind_ip 127.0.0.1 &> /dev/null & | |
cp ./.travis/mongoid.yml ./config/mongoid.yml | |
- name: Run cucumber | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 30 | |
max_attempts: 2 | |
retry_on: error | |
command: bundle exec cucumber features/products/ features/program_tests/ features/records/ features/users/ features/vendors/; | |
- name: Upload code coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: coverage | |
name: codecov-cucumber-2 | |
unit-test: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
# uses: ruby/setup-ruby@b12138f02d7d0c4d36f463e0885dc47ec25a52fe | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
. $HOME/.nvm/nvm.sh | |
nvm install 16.19 | |
nvm use stable | |
bundle install | |
git clone -b cypress_v6 https://github.com/projectcypress/cqm-execution-service.git /tmp/cqm-execution-service | |
yarn --cwd /tmp/cqm-execution-service install --only=production | |
yarn --cwd /tmp/cqm-execution-service start & | |
git clone -b cypress_v7 https://github.com/projecttacoma/cqm-execution-service.git /tmp/cqm-execution-service-56 | |
yarn --cwd /tmp/cqm-execution-service-56 install --only=production | |
yarn --cwd /tmp/cqm-execution-service-56 start & | |
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.18.tgz -O /tmp/mongodb.tgz | |
tar -xvf /tmp/mongodb.tgz | |
mkdir /tmp/data | |
${PWD}/mongodb-linux-x86_64-4.0.18/bin/mongod --setParameter cursorTimeoutMillis=3600000 --setParameter maxBSONDepth=500 --dbpath /tmp/data --bind_ip 127.0.0.1 &> /dev/null & | |
cp ./.travis/mongoid.yml ./config/mongoid.yml | |
- name: Run Rake test | |
run: | | |
RUBYOPT="-W0" | |
bundle exec rake test:units; | |
- name: Upload code coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: coverage | |
name: codecov-unit | |
controllers-jobs-helpers-test: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
# uses: ruby/setup-ruby@b12138f02d7d0c4d36f463e0885dc47ec25a52fe | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
. $HOME/.nvm/nvm.sh | |
nvm install 16.19 | |
nvm use stable | |
bundle install | |
git clone -b cypress_v6 https://github.com/projectcypress/cqm-execution-service.git /tmp/cqm-execution-service | |
yarn --cwd /tmp/cqm-execution-service install --only=production | |
yarn --cwd /tmp/cqm-execution-service start & | |
git clone -b cypress_v7 https://github.com/projecttacoma/cqm-execution-service.git /tmp/cqm-execution-service-56 | |
yarn --cwd /tmp/cqm-execution-service-56 install --only=production | |
yarn --cwd /tmp/cqm-execution-service-56 start & | |
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.18.tgz -O /tmp/mongodb.tgz | |
tar -xvf /tmp/mongodb.tgz | |
mkdir /tmp/data | |
${PWD}/mongodb-linux-x86_64-4.0.18/bin/mongod --setParameter cursorTimeoutMillis=3600000 --setParameter maxBSONDepth=500 --dbpath /tmp/data --bind_ip 127.0.0.1 &> /dev/null & | |
cp ./.travis/mongoid.yml ./config/mongoid.yml | |
- name: Run Rake test:jobs | |
run: | | |
RUBYOPT="-W0" | |
bundle exec rake test:jobs; | |
- name: Upload code jobs coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: coverage | |
name: codecov-job | |
- name: Run Rake test:helpers | |
run: | | |
RUBYOPT="-W0" | |
bundle exec rake test:helpers; | |
- name: Upload code helpers coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: coverage | |
name: codecov-helper | |
- name: Run Rake test:controllers | |
run: | | |
RUBYOPT="-W0" | |
bundle exec rake test:controllers; | |
- name: Upload controllers code coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: coverage | |
name: codecov-controller | |
integration-test: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
# uses: ruby/setup-ruby@b12138f02d7d0c4d36f463e0885dc47ec25a52fe | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
. $HOME/.nvm/nvm.sh | |
nvm install 16.19 | |
nvm use stable | |
bundle install | |
git clone -b cypress_v6 https://github.com/projectcypress/cqm-execution-service.git /tmp/cqm-execution-service | |
yarn --cwd /tmp/cqm-execution-service install --only=production | |
yarn --cwd /tmp/cqm-execution-service start & | |
git clone -b cypress_v7 https://github.com/projecttacoma/cqm-execution-service.git /tmp/cqm-execution-service-56 | |
yarn --cwd /tmp/cqm-execution-service-56 install --only=production | |
yarn --cwd /tmp/cqm-execution-service-56 start & | |
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.18.tgz -O /tmp/mongodb.tgz | |
tar -xvf /tmp/mongodb.tgz | |
mkdir /tmp/data | |
${PWD}/mongodb-linux-x86_64-4.0.18/bin/mongod --setParameter cursorTimeoutMillis=3600000 --setParameter maxBSONDepth=500 --dbpath /tmp/data --bind_ip 127.0.0.1 &> /dev/null & | |
cp ./.travis/mongoid.yml ./config/mongoid.yml | |
- name: Run Rake test | |
run: | | |
RUBYOPT="-W0" | |
bundle exec rake test:integration; | |
- name: Upload code coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: coverage | |
name: codecov-integration |