Skip to content

feat: created RoR sample #46

feat: created RoR sample

feat: created RoR sample #46

Workflow file for this run

name: Docker
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true
jobs:
test-sinatra:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- 'ubuntu-20.04'
- 'alpine-3.17'
package_ruby_ver:
- '3.2.5'
- '3.3.4'
container:
image: ghcr.io/tamatebako/tebako-${{ matrix.container }}:latest
steps:
- name: Install curl/procps
run: |
if [ -e "/etc/lsb-release" ]; then
apt-get -y update
apt-get -y install curl procps
elif [ -e "/etc/alpine-release" ]; then
apk --no-cache --upgrade add curl procps
fi
- name: Checkout sample
uses: actions/checkout@v4
- name: Package
run: tebako press -e app.rb -o sinatra.teb -r sinatra -R ${{ matrix.package_ruby_ver }}
- name: Test
run: ./sinatra.teb -h
- name: Start packaged Sinatra application
run: ./sinatra.teb &
env:
PORT: 4567
- name: Wait for Sinatra to start
run: sleep 10
- name: Place GET request
run: |
curl http://localhost:4567
- name: End Sinatra application
run: pkill -f sinatra.teb
test-rails:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- 'ubuntu-20.04'
- 'alpine-3.17'
package_ruby_ver:
- '3.2.5'
container:
image: ghcr.io/tamatebako/tebako-${{ matrix.container }}:latest
steps:
- name: Install curl/procps
run: |
if [ -e "/etc/lsb-release" ]; then
apt-get -y update
apt-get -y install curl procps
elif [ -e "/etc/alpine-release" ]; then
apk --no-cache --upgrade add curl procps
fi
- name: Checkout sample
uses: actions/checkout@v4
- name: Package
run: tebako press -e bin/rails -o rails.teb -r ror -R ${{ matrix.package_ruby_ver }}
- name: Create data folder
run: mkdir -p ror-data
- name: Test
run: ./rails.teb server --help
- name: Start packaged Rails application
run: ./rails.teb server --port=4567 --tebako-mount local/tmp:$PWD/ror-data/tmp --tebako-mount local/log:$PWD/ror-data/log &
- name: Wait for Rails to start
run: sleep 10
- name: Place GET request
run: |
curl http://localhost:4567
- name: End Rails application
run: pkill -f rails.teb