diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6678fcf..1eaf3ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,3 +23,28 @@ jobs: run: bundle exec rake rubocop - name: Run tests run: bundle exec rake spec + - name: Upload Logs + uses: actions/upload-artifact@v3 + with: + name: Logs + path: failing_specs_detector_log_*.txt + + print_log: + name: Test print logs task + needs: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.2 + bundler-cache: true + - name: Download Logs + uses: actions/download-artifact@v3 + with: + name: Logs + - name: Run print_log task + run: bundle exec rake failing_specs_detector:print_log + diff --git a/.gitignore b/.gitignore index b04a8c8..6f01695 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ # rspec failure tracking .rspec_status + +# log file +failing_specs_detector_log_*.txt diff --git a/spec/failing_spec_detector/failing_spec_formatter_spec.rb b/spec/failing_spec_detector/failing_spec_formatter_spec.rb index 21cf226..a1562ec 100644 --- a/spec/failing_spec_detector/failing_spec_formatter_spec.rb +++ b/spec/failing_spec_detector/failing_spec_formatter_spec.rb @@ -54,9 +54,9 @@ example end - after do - File.delete(actual_file_path) - end + # after do + # File.delete(actual_file_path) + # end it 'prints the failing specs backtraces grouped by exception' do mock_run_specs