From 5ff89a279cc63b003f2b8d4861676e9b6e22325e Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 21 May 2024 17:05:08 +1000 Subject: [PATCH] Use Spring to save on subsequent boot times Each time we run a rails command, it can take some time to load up (I think it was 20s). We run two commands (db setup, then rspec), so the second one should be faster now. --- .github/workflows/build.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e49c391133..66f7d5a3cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: - name: Set up database run: | - bundle exec rake db:create db:schema:load + bin/rake db:create db:schema:load - name: Run tests env: @@ -83,7 +83,7 @@ jobs: KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/controllers/**/*_spec.rb}" run: | git show --no-patch # the commit being tested (which is often a merge due to actions/checkout@v3) - bundle exec rake knapsack_pro:rspec + bin/rake knapsack_pro:rspec models: runs-on: ubuntu-22.04 @@ -125,7 +125,7 @@ jobs: - name: Set up database run: | - bundle exec rake db:create db:schema:load + bin/rake db:create db:schema:load - name: Run tests env: @@ -142,7 +142,7 @@ jobs: #KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/models/**/*_spec.rb}" run: | - bundle exec rake knapsack_pro:rspec + bin/rake knapsack_pro:rspec system_admin: runs-on: ubuntu-22.04 @@ -191,7 +191,7 @@ jobs: - name: Set up database run: | - bundle exec rake db:create db:schema:load + bin/rake db:create db:schema:load - name: Run tests @@ -210,7 +210,7 @@ jobs: KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/system/admin/**/*_spec.rb}" run: | - bundle exec rake knapsack_pro:queue:rspec + bin/rake knapsack_pro:queue:rspec - name: Archive failed tests screenshots if: failure() @@ -268,7 +268,7 @@ jobs: - name: Set up database run: | - bundle exec rake db:create db:schema:load + bin/rake db:create db:schema:load - name: Run tests @@ -287,7 +287,7 @@ jobs: KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/system/consumer/**/*_spec.rb}" run: | - bundle exec rake knapsack_pro:queue:rspec + bin/rake knapsack_pro:queue:rspec - name: Archive failed tests screenshots if: failure() @@ -346,7 +346,7 @@ jobs: - name: Set up database run: | - bundle exec rake db:create db:schema:load + bin/rake db:create db:schema:load - name: Run tests @@ -365,7 +365,7 @@ jobs: KNAPSACK_PRO_TEST_FILE_PATTERN: "{spec/lib/**/*_spec.rb,spec/migrations/**/*_spec.rb,spec/serializers/**/*_spec.rb,engines/**/*_spec.rb}" run: | - bundle exec rake knapsack_pro:rspec + bin/rake knapsack_pro:rspec - name: Archive failed tests screenshots if: failure() @@ -424,7 +424,7 @@ jobs: - name: Set up database run: | - bundle exec rake db:create db:schema:load + bin/rake db:create db:schema:load - name: Run tests env: @@ -441,7 +441,7 @@ jobs: #KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN: "{engines/**/*_spec.rb,spec/models/**/*_spec.rb,spec/controllers/**/*_spec.rb,spec/serializers/**/*_spec.rb,spec/lib/**/*_spec.rb,spec/migrations/**/*_spec.rb,spec/system/**/*_spec.rb}" run: | - bundle exec rake knapsack_pro:rspec + bin/rake knapsack_pro:rspec non_knapsack_jest_karma: runs-on: ubuntu-22.04 @@ -475,7 +475,7 @@ jobs: run: yarn install --frozen-lockfile - name: Run JS tests - run: bundle exec rake karma:run + run: bin/rake karma:run - name: Run jest tests run: yarn jest