Bump simplecov from 1.0.3 to 1.1.0 #238
Workflow file for this run
This file contains hidden or 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: Lint and Test | |
| on: | |
| push: | |
| branches-ignore: | |
| - main | |
| workflow_dispatch: {} | |
| env: | |
| RAILS_ENV: test | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| ruby: [ "3.4" ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Lint | |
| run: bundle exec rubocop | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: Lint | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| ruby: [ "3.4" ] | |
| services: | |
| zookeeper: | |
| image: zookeeper:3.7 | |
| env: | |
| ZOO_CFG_EXTRA: "4lw.commands.whitelist=mntr,conf,ruok" | |
| ports: | |
| - 2181:2181 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Start Solr | |
| run: | | |
| # Get the network name that services are using | |
| NETWORK=$(docker network ls --filter name=github --format "{{.Name}}") | |
| docker run -d --name solr \ | |
| --network $NETWORK \ | |
| -p 8983:8983 \ | |
| -e ZK_HOST="zookeeper:2181" \ | |
| solr:9.8.1 \ | |
| solr-foreground -Dsolr.modules=analysis-extras | |
| - name: Wait for ZooKeeper to be ready | |
| run: | | |
| timeout 60 bash -c 'until nc -z localhost 2181; do sleep 2; done' | |
| - name: Wait for Solr container to be running | |
| run: | | |
| for i in {1..30}; do | |
| CONTAINER=$(docker ps --filter "ancestor=solr:9.8.1" --format "{{.ID}}") | |
| if [ -n "$CONTAINER" ]; then | |
| echo "Solr container is running: $CONTAINER" | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "Solr container did not start in time" | |
| exit 1 | |
| - name: Wait for Solr HTTP to be ready | |
| run: | | |
| timeout 60 bash -c 'until curl -sf http://localhost:8983/solr/admin/info/system > /dev/null 2>&1; do sleep 2; done' | |
| - name: Upload security.json file to solr container | |
| run: | | |
| SOLR_CONTAINER=$(docker ps --filter "ancestor=solr:9.8.1" --format "{{.ID}}") | |
| docker cp .github/workflows/security.json $SOLR_CONTAINER:/security.json | |
| - name: Upload security.json to Zookeeper | |
| run: | | |
| SOLR_CONTAINER=$(docker ps --filter "ancestor=solr:9.8.1" --format "{{.ID}}") | |
| docker exec $SOLR_CONTAINER bin/solr zk cp /security.json zk:/security.json | |
| - name: Test | |
| run: bundle exec rspec spec | |
| - name: Upload coverage to Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: ./coverage/lcov/cob_index.lcov | |
| fail-on-error: false | |
| - name: Load Solr config & data | |
| run: make load-data | |
| - name: Run relevancy Tests | |
| run: make test-relevancy |