From 43b476a34265648d86339874e6d41234fa015e06 Mon Sep 17 00:00:00 2001 From: dblock Date: Thu, 24 Mar 2022 12:42:36 -0400 Subject: Run CI on all branches. --- .github/workflows/main.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 229eafc..415514f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,12 +1,5 @@ name: CI - -on: - push: - branches: - - master - pull_request: - branches: - - master +on: [push, pull_request] jobs: danger: -- cgit v1.2.1 From 7a9c4a7d41fc57d7b323b5556988e5d2b482af28 Mon Sep 17 00:00:00 2001 From: dblock Date: Fri, 25 Mar 2022 09:54:00 -0400 Subject: Move danger into its own workflow file. --- .github/workflows/danger.yml | 26 +++++++++++++ .github/workflows/main.yml | 92 -------------------------------------------- .github/workflows/test.yml | 72 ++++++++++++++++++++++++++++++++++ README.md | 2 +- 4 files changed, 99 insertions(+), 93 deletions(-) create mode 100644 .github/workflows/danger.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 0000000..fcc506f --- /dev/null +++ b/.github/workflows/danger.yml @@ -0,0 +1,26 @@ +name: CI +on: + pull_request: + branches: + - master + +jobs: + danger: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7 + bundler-cache: true + - uses: MeilCli/danger-action@v5.5.0 + with: + danger_file: Dangerfile + danger_id: danger-pr + install_path: vendor/bundle + plugins_file: Gemfile + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 415514f..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: CI -on: [push, pull_request] - -jobs: - danger: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - bundler-cache: true - - uses: MeilCli/danger-action@v5 - with: - danger_file: Dangerfile - danger_id: danger-pr - install_path: vendor/bundle - plugins_file: Gemfile - env: - DANGER_GITHUB_API_TOKEN: ${{ secrets.github_token }} - - integration-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: 2.7 - - name: Run integration tests - run: | - for dir in spec/integration/*; do - echo "testing $dir integration" - BUNDLE_GEMFILE=$dir/Gemfile bundle install --jobs 4 --retry 3 - BUNDLE_GEMFILE=$dir/Gemfile bundle exec rspec $dir - done - - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ruby: - - '3.1' - - '3.0' - - '2.7' - - '2.6' - - '2.5' - - '2.4' - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: ${{ matrix.ruby }} - - name: Install dependencies - run: bundle install --jobs 4 --retry 3 - - name: Run tests - env: - RUBYOPT: "--disable-error_highlight" - run: bundle exec rake - - test-jruby: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - os: - - macos - - ubuntu - jruby: - - jruby - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: ${{ matrix.jruby }} - - name: Install dependencies - env: - JRUBY_OPTS: --debug - run: bundle install --jobs 4 --retry 3 - - name: Run tests - env: - JRUBY_OPTS: --debug - run: bundle exec rake diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b3f478f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,72 @@ +name: CI +on: [push, pull_request] + +jobs: + integration-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: 2.7 + - name: Run integration tests + run: | + for dir in spec/integration/*; do + echo "testing $dir integration" + BUNDLE_GEMFILE=$dir/Gemfile bundle install --jobs 4 --retry 3 + BUNDLE_GEMFILE=$dir/Gemfile bundle exec rspec $dir + done + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - '3.1' + - '3.0' + - '2.7' + - '2.6' + - '2.5' + - '2.4' + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ${{ matrix.ruby }} + - name: Install dependencies + run: bundle install --jobs 4 --retry 3 + - name: Run tests + env: + RUBYOPT: "--disable-error_highlight" + run: bundle exec rake + + test-jruby: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: + - macos + - ubuntu + jruby: + - jruby + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ${{ matrix.jruby }} + - name: Install dependencies + env: + JRUBY_OPTS: --debug + run: bundle install --jobs 4 --retry 3 + - name: Run tests + env: + JRUBY_OPTS: --debug + run: bundle exec rake diff --git a/README.md b/README.md index db93eb8..9bb49ee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Join the chat at https://gitter.im/hashie/hashie](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hashie/hashie?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Gem Version](http://img.shields.io/gem/v/hashie.svg)](http://badge.fury.io/rb/hashie) -[![Build Status](https://github.com/hashie/hashie/actions/workflows/main.yml/badge.svg)](https://github.com/hashie/hashie/actions/workflows/main.yml) +[![Build Status](https://github.com/hashie/hashie/actions/workflows/test.yml/badge.svg)](https://github.com/hashie/hashie/actions/workflows/test.yml) [![eierlegende Wollmilchsau](./mascot.svg)](#mascot) Hashie is a growing collection of tools that extend Hashes and make them more useful. -- cgit v1.2.1 From f326db495a7690e3ae6db447b196c4d2f9a9079a Mon Sep 17 00:00:00 2001 From: dblock Date: Sat, 26 Mar 2022 12:49:00 -0400 Subject: Use a public PAT. --- .github/workflows/danger.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index fcc506f..f6a2e5f 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -1,26 +1,21 @@ -name: CI -on: - pull_request: - branches: - - master - +--- +name: danger +on: [pull_request] jobs: danger: runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: ruby/setup-ruby@v1 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 2.6 bundler-cache: true - - uses: MeilCli/danger-action@v5.5.0 - with: - danger_file: Dangerfile - danger_id: danger-pr - install_path: vendor/bundle - plugins_file: Gemfile - env: - DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Run Danger + run: | + bundle install + # the personal token is public, this is ok, base64 encode to avoid tripping Github + TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode) + DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose \ No newline at end of file -- cgit v1.2.1 From 92dc0845c567c851ef11edc7af734fce3ad4867b Mon Sep 17 00:00:00 2001 From: dblock Date: Sat, 26 Mar 2022 12:55:53 -0400 Subject: Fix: TOC. --- README.md | 84 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 9bb49ee..7eb039b 100644 --- a/README.md +++ b/README.md @@ -8,49 +8,47 @@ # Table of Contents -- [Hashie](#hashie) -- [Table of Contents](#table-of-contents) - - [Installation](#installation) - - [Stable Release](#stable-release) - - [Hash Extensions](#hash-extensions) - - [Logging](#logging) - - [Coercion](#coercion) - - [Coercing Collections](#coercing-collections) - - [Coercing Hashes](#coercing-hashes) - - [Coercing Core Types](#coercing-core-types) - - [Coercion Proc](#coercion-proc) - - [A note on circular coercion](#a-note-on-circular-coercion) - - [KeyConversion](#keyconversion) - - [MergeInitializer](#mergeinitializer) - - [MethodAccess](#methodaccess) - - [MethodAccessWithOverride](#methodaccesswithoverride) - - [MethodOverridingInitializer](#methodoverridinginitializer) - - [IndifferentAccess](#indifferentaccess) - - [IgnoreUndeclared](#ignoreundeclared) - - [DeepMerge](#deepmerge) - - [DeepFetch](#deepfetch) - - [DeepFind](#deepfind) - - [DeepLocate](#deeplocate) - - [StrictKeyAccess](#strictkeyaccess) - - [Mash](#mash) - - [KeepOriginalKeys](#keeporiginalkeys) - - [PermissiveRespondTo](#permissiverespondto) - - [SafeAssignment](#safeassignment) - - [SymbolizeKeys](#symbolizekeys) - - [DefineAccessors](#defineaccessors) - - [Dash](#dash) - - [Potential Gotchas](#potential-gotchas) - - [PropertyTranslation](#propertytranslation) - - [Mash and Rails 4 Strong Parameters](#mash-and-rails-4-strong-parameters) - - [Coercion](#coercion-1) - - [PredefinedValues](#predefinedvalues) - - [Trash](#trash) - - [Clash](#clash) - - [Rash](#rash) - - [Auto-Optimized](#auto-optimized) - - [Mascot](#mascot) - - [Contributing](#contributing) - - [Copyright](#copyright) +- [Installation](#installation) +- [Stable Release](#stable-release) +- [Hash Extensions](#hash-extensions) +- [Logging](#logging) + - [Coercion](#coercion) + - [Coercing Collections](#coercing-collections) + - [Coercing Hashes](#coercing-hashes) + - [Coercing Core Types](#coercing-core-types) + - [Coercion Proc](#coercion-proc) + - [A note on circular coercion](#a-note-on-circular-coercion) + - [KeyConversion](#keyconversion) + - [MergeInitializer](#mergeinitializer) + - [MethodAccess](#methodaccess) + - [MethodAccessWithOverride](#methodaccesswithoverride) + - [MethodOverridingInitializer](#methodoverridinginitializer) + - [IndifferentAccess](#indifferentaccess) + - [IgnoreUndeclared](#ignoreundeclared) + - [DeepMerge](#deepmerge) + - [DeepFetch](#deepfetch) + - [DeepFind](#deepfind) + - [DeepLocate](#deeplocate) +- [StrictKeyAccess](#strictkeyaccess) +- [Mash](#mash) + - [KeepOriginalKeys](#keeporiginalkeys) + - [PermissiveRespondTo](#permissiverespondto) + - [SafeAssignment](#safeassignment) + - [SymbolizeKeys](#symbolizekeys) + - [DefineAccessors](#defineaccessors) +- [Dash](#dash) + - [Potential Gotchas](#potential-gotchas) + - [PropertyTranslation](#propertytranslation) + - [Mash and Rails 4 Strong Parameters](#mash-and-rails-4-strong-parameters) + - [Coercion](#coercion-1) + - [PredefinedValues](#predefinedvalues) +- [Trash](#trash) +- [Clash](#clash) +- [Rash](#rash) + - [Auto-Optimized](#auto-optimized) +- [Mascot](#mascot) +- [Contributing](#contributing) +- [Copyright](#copyright) ## Installation -- cgit v1.2.1