Expose docker-compose for localstack (#813) #319
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Specs | |
on: | |
- push | |
- pull_request | |
jobs: | |
all_specs: | |
name: All Specs | |
strategy: | |
matrix: | |
ruby: ['3.0', '3.1', '3.2', '3.3', '3.4'] | |
gemfile: ['Gemfile'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Start LocalStack | |
run: docker compose up -d | |
- name: Wait for LocalStack | |
run: | | |
timeout 30s bash -c ' | |
until curl -s http://localhost:4566/_localstack/health | grep -q "\"sqs\": \"available\""; do | |
echo "Waiting for LocalStack..." | |
sleep 2 | |
done | |
' | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run specs | |
run: bundle exec rake spec | |
env: | |
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | |
- name: Run integration specs | |
run: bundle exec rake spec:integration | |
env: | |
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | |
rails_specs: | |
name: Rails Specs | |
strategy: | |
matrix: | |
rails: ['6.1', '7.0', '7.1', '7.2', '8.0'] | |
include: | |
- rails: '6.1' | |
ruby: '3.0' | |
gemfile: gemfiles/rails_6_1.gemfile | |
- rails: '7.0' | |
ruby: '3.1' | |
gemfile: gemfiles/rails_7_0.gemfile | |
- rails: '7.1' | |
ruby: '3.2' | |
gemfile: gemfiles/rails_7_1.gemfile | |
- rails: '7.2' | |
ruby: '3.3' | |
gemfile: gemfiles/rails_7_2.gemfile | |
- rails: '8.0' | |
ruby: '3.4' | |
gemfile: gemfiles/rails_8_0.gemfile | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run Rails specs | |
run: bundle exec rake spec:rails |