Skip to content

Allocate new response objects for every request #8

Allocate new response objects for every request

Allocate new response objects for every request #8

Workflow file for this run

# 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, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
localstack:
image: localstack/localstack
ports:
- 4566:4566
strategy:
matrix:
gemfile:
- rails52
- rails60
- rails61
- rails70
ruby:
- "2.7"
- "3.0"
except_deploy:
- "true"
exclude:
- gemfile: rails52
ruby: "3.0"
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
EXCEPT_DEPLOYED: ${{ matrix.except_deploy }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Configure EB CLI
if: env.EXCEPT_DEPLOYED == 'false'
run: |
sudo pip install --upgrade pip
sudo pip install awsebcli --ignore-installed
- name: Run tests
run: bundle exec rspec spec
deploy:
if: github.ref == 'refs/heads/master' || (github.head_ref == 'develop' && github.base_ref == 'master')
runs-on: ubuntu-latest
environment: deployment
needs: build
services:
localstack:
image: localstack/localstack
ports:
- 4566:4566
strategy:
matrix:
gemfile:
- rails70
ruby:
- "3.0"
except_deploy:
- "false"
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
EXCEPT_DEPLOYED: ${{ matrix.except_deploy }}
AWS_CONFIG_FILE: ${{ github.workspace }}/aws_config
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_VPC_ID: ${{ secrets.AWS_VPC_ID }}
AWS_REGION: us-east-1
WEB_ENV_HOST: active-elastic-job.us-east-1.elasticbeanstalk.com
WEB_ENV_PORT: 443
WEB_ENV_NAME: web-env
WORKER_ENV_NAME: worker-env
steps:
- name: Pull request branches
run: echo "Head Ref = ${{ github.head_ref }}, Base Ref = ${{ github.base_ref }}, Ref = ${{ github.ref }}"
- name: Disallow Concurrent Runs
uses: byu-oit/github-action-disallow-concurrent-runs@v2
with:
token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1.62.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Configure EB CLI
if: env.EXCEPT_DEPLOYED == 'false'
run: |
sudo pip install --upgrade pip
sudo pip install awsebcli --ignore-installed
- name: Run tests
run: bundle exec rspec spec