.github/workflows/build.yml in antbird-0.1.1 vs .github/workflows/build.yml in antbird-0.2.0
- old
+ new
@@ -4,36 +4,38 @@
jobs:
build:
runs-on: ubuntu-latest
strategy:
+ fail-fast: false
matrix:
+ # 1. Run script/list_versions
+ # 2. Check https://www.elastic.co/jp/support/eol
elasticsearch:
- - 7.5.0
+ - 7.9.2
+ - 7.8.1
+ - 7.7.1
+ - 7.6.2
+ - 7.5.2
- 7.4.2
- 7.3.2
- 7.2.1
- 7.1.1
- - 7.0.1
- - 6.8.5
- - 6.7.2
- - 6.6.2
- - 6.5.4
- - 6.4.3
+ - 6.8.12
+ services:
+ elasticsearch:
+ image: docker.elastic.co/elasticsearch/elasticsearch-oss:${{matrix.elasticsearch}}
+ ports:
+ - 9200:9200
+ - 9300:9300
+ env:
+ discovery.type: single-node
steps:
- - uses: actions/checkout@v1
- - name: Set up Ruby 2.6
- uses: actions/setup-ruby@v1
+ - uses: actions/checkout@v2
+ - uses: ruby/setup-ruby@v1
with:
- ruby-version: 2.6.x
- - name: Start Elasticsearch
- run: |
- docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" \
- docker.elastic.co/elasticsearch/elasticsearch-oss:${{matrix.elasticsearch}}
- docker ps
- - name: Build and test with Rake
- run: |
- gem install bundler
- bundle install --jobs 4 --retry 3
- # wait for elasticsearch
- curl -q --retry 10 --retry-delay 5 --retry-connrefused http://localhost:9200
- bundle exec rspec
+ ruby-version: 2.6
+ bundler-cache: true
+ - run: bundle install --jobs 4 --retry 3
+ - name: Wait for elasticsearch
+ run: timeout 60 bash -c "until curl --silent --output /dev/null localhost:9200/_cat/health?h=st; do printf '.'; sleep 5; done; printf '\n'"
+ - run: bundle exec rspec