name: Ruby on: [push,pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.0.2 - name: Run the default task run: | gem install bundler bundle install bundle exec rake - name: Run the actual server run: | bundle exec ruby bin/right_speed -c snippets/test.ru & sleep 5 output=$(curl -s http://127.0.0.1:8080/) kill %1 echo "Output: $output" test "$output" = "Yaaay" - name: Run rackup # Using production not to use middlewares for development (lint, etc) run: | bundle exec rackup snippets/test.ru -s right_speed -E production -O Host=127.0.0.1 -O Port=8081 & sleep 5 output=$(curl -s http://127.0.0.1:8081/) kill %1 echo "Output: $output" test "$output" = "Yaaay"