diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 327e646..dd9d0fd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,10 @@ on: branches: [master] pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + permissions: contents: read diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8464ddb..af59b73 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,12 @@ name: Test -on: [push, pull_request] +on: + push: + branches: [master] + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: read @@ -43,7 +49,7 @@ jobs: shell=mongosh if docker exec "$CONTAINER" bash -c 'command -v mongo >/dev/null'; then shell=mongo; fi docker exec "$CONTAINER" "$shell" --port 27018 --quiet --eval 'rs.initiate({_id:"rs0",members:[{_id:0,host:"localhost:27018"}]})' - for attempt in $(seq 1 60); do + for _ in $(seq 1 60); do if docker exec "$CONTAINER" "$shell" --port 27018 --quiet --eval 'quit(db.isMaster().ismaster ? 0 : 1)'; then break; fi sleep 1 done diff --git a/CHANGELOG.md b/CHANGELOG.md index b03cb2f..26fe560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Your contribution here. * [#94](https://github.com/mongoid/mongoid_orderable/pull/94): Lint Markdown, YAML, and spelling with rubocop-md, rubocop-prose, rubocop-spellcheck, and rubocop-yaml in a separate Lint workflow, and clean up documentation - [@dblock](https://github.com/dblock). +* [#95](https://github.com/mongoid/mongoid_orderable/pull/95): Run CI pushes only on the default branch, cancel superseded pull request runs, skip duplicate lint in the test matrix, and bound job times - [@dblock](https://github.com/dblock). ### 6.0.7 (2026/10/18)