Skip to content

Commit

Permalink
Add elasticsearch github actions configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardobrito committed Oct 5, 2023
1 parent edb0d3d commit 0f43ae0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
- scan
runs-on: ubuntu-latest
env:
ELASTICSEARCH_HOST: https://localhost:9200
DATABASE_URL: postgres://postgres:example@localhost:5432/app_test
services:
postgres:
Expand Down Expand Up @@ -79,6 +80,30 @@ jobs:
- name: Install Yarn packages
run: yarn install --check-files --pure-lockfile

- name: Configure sysctl 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
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.10.2

- name: Elasticsearch is reachable
run: |
curl --verbose --show-error --insecure https://localhost:9200
- name: Bundle
run: |
sudo apt-get install libsqlite3-dev
gem install bundler
bundle install
bundle exec rake bundle:clean
bundle exec rake bundle:install
- name: Create database structure
run: RAILS_ENV=test bundle exec rails db:create db:schema:load

Expand Down

0 comments on commit 0f43ae0

Please sign in to comment.