[CI] Updates actions/checkout version in GitHub Actions #224
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 tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: 'Main tests' | |
env: | |
TEST_ES_SERVER: http://localhost:9250 | |
PORT: 9250 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: [ '3.0', '3.1', '3.2', 'jruby-9.3', 'jruby-9.4' ] | |
es_version: ['8.7-SNAPSHOT', '8.8-SNAPSHOT', '8.9-SNAPSHOT'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Increase system limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- uses: elastic/elastic-github-actions/elasticsearch@master | |
with: | |
stack-version: ${{ matrix.es_version }} | |
security-enabled: false | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Build and test with Rake | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
ruby -v | |
bundle install | |
- name: unit tests | |
run: bundle exec rake test:unit | |
- name: specs | |
run: bundle exec rake test:spec | |
- name: integration tests | |
run: bundle exec rake test:integration | |
test-faraday1: | |
name: 'Test Faraday 1' | |
env: | |
TEST_ES_SERVER: http://localhost:9250 | |
PORT: 9250 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: [ '3.0', '3.1', '3.2', 'jruby-9.3' ] | |
es_version: ['8.9-SNAPSHOT'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Increase system limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- uses: elastic/elastic-github-actions/elasticsearch@master | |
with: | |
stack-version: ${{ matrix.es_version }} | |
security-enabled: false | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Build and test with Rake | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
ruby -v | |
gem install bundler | |
BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle install | |
- name: faraday1 unit tests | |
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:unit | |
- name: specs | |
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:spec | |
- name: integration tests | |
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:integration |