Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
axelpontetto committed Dec 5, 2024
1 parent 6ac68b5 commit 5cb875a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20

env:
RAILS_ENV: test
POSTGRES_HOST: db

services:
db:
image: postgres:15
Expand Down Expand Up @@ -176,18 +180,19 @@ jobs:
./cc-test-reporter before-build
# - name: Let Rails generate the secret_key_base
# run: bundle exec rails runner 'puts Rails.application.secret_key_base'
- name: Get CPU info
id: cpu_info
run: echo "cpu_cores=$(nproc)" >> $GITHUB_ENV
- name: Setup Database
env:
PARALLEL_TESTS_CONCURRENCY: ${{ env.cpu_cores }}
uses: ./.github/actions/docker-run
with:
run: bundle exec rake parallel:create parallel:migrate
- name: Check for untracked changes in schema.rb
uses: rootstrap/check_untracked_changes@v1
with:
path: "./db/schema.rb"
- name: Get CPU info
id: cpu_info
run: echo "cpu_cores=$(nproc)" >> $GITHUB_ENV

- name: This is the worst patch ever
run: |
docker run -it -d --name rails_app api_base/test:latest "sleep infinity"
Expand All @@ -202,8 +207,6 @@ jobs:
HEADLESS: true
SELENIUM_BROWSER_HOST: http://chrome-server:4444
SELENIUM_BROWSER: remote
POSTGRES_HOST: db
RAILS_ENV: test
uses: ./.github/actions/docker-run
with:
run: bundle exec parallel_rspec -n $PARALLEL_TESTS_CONCURRENCY -e './bin/parallel_tests'
Expand Down

0 comments on commit 5cb875a

Please sign in to comment.