Skip to content

Commit

Permalink
Allow failure of tests with dev branches
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmhaig committed Jun 21, 2024
1 parent f32c545 commit 8a91618
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/activerecord_head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -23,8 +22,5 @@ jobs:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Allow tests to run on Active Record head without failing the pipeline
run: bundle exec rspec || true
9 changes: 3 additions & 6 deletions .github/workflows/ruby_head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:

jobs:
test:

runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
gemfile: [ activerecord_6.1, activerecord_7.0, activerecord_7.1 ]
Expand All @@ -23,8 +23,5 @@ jobs:
ruby-version: head
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Allow tests to run on Ruby head without failing the pipeline
run: bundle exec rspec || true
6 changes: 4 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Contributations to this project are welcome. The current needs are;

When making code changes please include unit tests for any new code and ensure that all tests pass for supported versions of Ruby and Active Record. These tests are run automatically.

Note that the tests are also run automatically for the current development branches of Ruby and Active Record. It is not necessary for all tests to pass in these cases. However;
Note that the tests are also run automatically for the current development branches of Ruby and Active Record. It is not necessary for all tests to pass in these cases and they are set up to always report as a success to avoid causing the whole pipeline to appear as failed[^1]. However;

* Please try at least for new tests in the PR to pass unless there is an identifiable issue in the development version of either Ruby or Active Record.
* For any new failures you see please consider raising an issue to have it fixed.
* For any new failures you see please consider raising an issue to have it fixed.

[^1]: See [this issue](https://github.com/actions/runner/issues/2347) and [this discussion](https://github.com/orgs/community/discussions/15452) for a long-running discussion on the missing "allow failure" feature in Github Actions.

0 comments on commit 8a91618

Please sign in to comment.