diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 864621e2ec..1e58b9b52a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -207,9 +207,8 @@ jobs: - name: Cache parallel tests log uses: actions/cache@v1 with: - path: tests/parallel_runtime_rspec.log - key: ${{ runner.os }}-parallel_runtime_rspec.log - restore-keys: ${{ runner.os }}-parallel_runtime_rspec.log + path: tests + key: ${{ runner.os }}-${{ matrix.test-flags }}-parallel_runtime_rspec - name: Run brew tests run: | @@ -299,9 +298,8 @@ jobs: - name: Cache parallel tests log uses: actions/cache@v1 with: - path: tests/parallel_runtime_rspec.log + path: tests key: ${{ runner.os }}-parallel_runtime_rspec.log - restore-keys: ${{ runner.os }}-parallel_runtime_rspec.log - name: Run brew tests run: brew tests --online --coverage diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 5ee0020937..4900b0ef8d 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -98,10 +98,16 @@ module Homebrew Dir.glob("test/**/*_spec.rb") end + parallel_rspec_log_name = "parallel_runtime_rspec" + parallel_rspec_log_name = "#{parallel_rspec_log_name}.no_compat" if args.no_compat? + parallel_rspec_log_name = "#{parallel_rspec_log_name}.generic" if args.generic? + parallel_rspec_log_name = "#{parallel_rspec_log_name}.online" if args.online? + parallel_rspec_log_name = "#{parallel_rspec_log_name}.log" + parallel_rspec_log_path = if ENV["CI"] - "tests/parallel_runtime_rspec.log" + "tests/#{parallel_rspec_log_name}" else - "#{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log" + "#{HOMEBREW_CACHE}/#{parallel_rspec_log_name}" end parallel_args = if ENV["CI"]