Skip to content

[release] 2.0.17

[release] 2.0.17 #156

Workflow file for this run

on: push
name: Tests
jobs:
ruby-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.7', '3.0', '3.1']
name: Ruby Tests
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
- run: |
docker run --publish 6379:6379 --detach redis:latest
sleep 5
bundle exec ruby init.rb
bundle exec ruby test/test.rb
docker-tests:
name: Docker Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Docker Build
run: |
docker build -t ifsc-api .
container_name=$(docker run --publish 3000:3000 --detach ifsc-api .)
# Wait for it to come up. Creating the dataframe can take time and hence need to wait till the server is up to prevent empty response error.
sleep 200
docker logs $container_name
curl -I http://localhost:3000
curl -v http://localhost:3000/HDFC0CAGSBK
docker stop $container_name && docker rm $container_name && docker rmi ifsc-api