node #3
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: Main | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
redis: | |
image: redis | |
ports: | |
- 6379/tcp | |
elasticsearch: | |
image: elasticsearch:7.10.1 | |
env: | |
discovery.type: single-node | |
ports: | |
- 9200:9200 | |
options: -e="discovery.type=single-node" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2.0' # Not needed with a .ruby-version file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Build and test with Rake | |
env: | |
MYSQL_HOST: 127.0.0.1 | |
MYSQL_PORT: 3306 | |
MYSQL_USERNAME: root | |
MYSQL_PASSWORD: password | |
ELASTICSEARCH_URL: http://localhost:9200 | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
bundle exec rspec |