diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 29edbf0..3790d10 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,6 +1,13 @@ --- name: coverage -on: [push, pull_request] +on: + push: + branches: [master] + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: COVERAGE: 1 @@ -9,7 +16,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: '4.0' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 76ba84a..4e7fff6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,12 +1,19 @@ name: lint -on: [push, pull_request] +on: + push: + branches: [master] + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: rubocop: name: RuboCop runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ab052d..c789b36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,13 @@ --- name: test -on: [push, pull_request] +on: + push: + branches: [master] + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: test: runs-on: ${{ matrix.entry.os || 'ubuntu-latest' }} @@ -18,11 +25,15 @@ jobs: name: test (Ruby ${{ matrix.entry.ruby }}, JSON ${{ matrix.entry.json || '3' }}) env: JSON_VERSION: ${{ matrix.entry.json || '3' }} + # Speeds up JRuby startup, which dominates its bundle and test steps. CRuby ignores it. + JRUBY_OPTS: --dev steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.entry.ruby }} bundler-cache: true + # Gemfile.lock isn't committed, so keep JSON 2 and JSON 3 bundles from restoring each other's cache. + cache-version: json-${{ matrix.entry.json || '3' }} - run: bundle exec rake test spinach continue-on-error: ${{ matrix.entry.allowed-failure || false }} diff --git a/CHANGELOG.md b/CHANGELOG.md index cdbadf6..2ea0959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * [#336](https://github.com/codegram/hyperclient/pull/336): Fixed `SystemStackError` when iterating a link whose resource links back to itself under the same name, raising `Hyperclient::SelfReferencingLinkError` instead - [@dblock](https://github.com/dblock). * [#337](https://github.com/codegram/hyperclient/pull/337): Updated danger-pr-comment to 0.3.0 and stopped posting empty Danger reports - [@dblock](https://github.com/dblock). * [#338](https://github.com/codegram/hyperclient/pull/338): Documented link properties, including HAL `profile` via `Link#_profile` - [@dblock](https://github.com/dblock). +* [#339](https://github.com/codegram/hyperclient/pull/339): Sped up CI by running JRuby with `--dev`, separating JSON 2 and JSON 3 bundler caches, skipping duplicate branch builds, and updating `actions/checkout` to v7 - [@dblock](https://github.com/dblock). * Your contribution here. ### 2.1.0 (2026/10/14)