Untitled

mail@pastecode.io avatar
unknown
yaml
a year ago
941 B
2
Indexable
Never
version: 0.2

phases:
  install:
    runtime-versions:
      ruby: 2.7
    commands:
      # Install rbenv
      - apt-get update
      - apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev
      - git clone https://github.com/rbenv/rbenv.git ~/.rbenv
      - echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
      - echo 'eval "$(rbenv init -)"' >> ~/.bashrc
      - exec $SHELL
      # Install ruby-build plugin
      - git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

  build:
    commands:
      # Install Ruby version specified in .ruby-version
      - rbenv install $(cat .ruby-version)
      - rbenv global $(cat .ruby-version)
      - ruby -v
      # Install dependencies and run tests
      - gem install bundler
      - bundle install
      - bundle exec rspec spec/