diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2e06789..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,193 +0,0 @@ -# Ruby CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-ruby/ for more details -# -version: 2 -jobs: - "ruby-2.3": - docker: - - image: hanami/ruby-2.3 - working_directory: ~/hanami-controller - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: install dependencies - command: | - bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - # run tests! - - run: - name: run tests - command: | - ./script/ci - "ruby-2.4": - docker: - - image: hanami/ruby-2.4 - working_directory: ~/hanami-controller - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: install dependencies - command: | - bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - # run tests! - - run: - name: run tests - command: | - ./script/ci - "ruby-2.5": - docker: - - image: hanami/ruby-2.5 - working_directory: ~/hanami-controller - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: install dependencies - command: | - bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - # run tests! - - run: - name: run tests - command: | - ./script/ci - "ruby-2.6": - docker: - - image: hanami/ruby-2.6 - working_directory: ~/hanami-controller - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: install dependencies - command: | - bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - # run tests! - - run: - name: run tests - command: | - ./script/ci - "ruby-2.7": - docker: - - image: hanami/ruby-2.7 - working_directory: ~/hanami-controller - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: install dependencies - command: | - bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - # run tests! - - run: - name: run tests - command: | - ./script/ci - "jruby-9.1": - docker: - - image: hanami/jruby-9.1 - working_directory: ~/hanami-controller - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: install dependencies - command: | - bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - # run tests! - - run: - name: run tests - command: | - ./script/ci - "jruby-9.2": - docker: - - image: hanami/jruby-9.2 - working_directory: ~/hanami-controller - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: install dependencies - command: | - bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - # run tests! - - run: - name: run tests - command: | - ./script/ci - -workflows: - version: 2 - build: - jobs: - - "ruby-2.3" - - "ruby-2.4" - - "ruby-2.5" - - "ruby-2.6" - - "ruby-2.7" - - "jruby-9.1" - - "jruby-9.2" diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index e9c0b66..0000000 --- a/.drone.yml +++ /dev/null @@ -1,454 +0,0 @@ -kind: pipeline -name: ruby-2-7 -group: build - -steps: -- name: install - image: ruby:2.7 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: ruby:2.7 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: isolation - image: ruby:2.7 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test isolation - -- name: integration - image: ruby:2.7 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: ruby:2.7 - environment: - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: ruby-2-6 -group: build - -steps: -- name: install - image: ruby:2.6 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: ruby:2.6 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: isolation - image: ruby:2.6 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test isolation - -- name: integration - image: ruby:2.6 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: ruby:2.6 - environment: - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: ruby-2-5 -group: build - -steps: -- name: install - image: ruby:2.5 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: ruby:2.5 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: isolation - image: ruby:2.5 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test isolation - -- name: integration - image: ruby:2.5 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: ruby:2.5 - environment: - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: ruby-2-4 -group: build - -steps: -- name: install - image: ruby:2.4 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: ruby:2.4 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: isolation - image: ruby:2.4 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test isolation - -- name: integration - image: ruby:2.4 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: ruby:2.4 - environment: - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: ruby-2-3 -group: build - -steps: -- name: install - image: ruby:2.3 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: ruby:2.3 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: isolation - image: ruby:2.3 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test isolation - -- name: integration - image: ruby:2.3 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: ruby:2.3 - environment: - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: jruby-9-2 -group: build - -steps: -- name: install - image: hanami/jruby-9.2 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: hanami/jruby-9.2 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: integration - image: hanami/jruby-9.2 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: hanami/jruby-9.2 - environment: - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: jruby-9-1 -group: build - -steps: -- name: install - image: hanami/jruby-9.1 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: hanami/jruby-9.1 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: integration - image: hanami/jruby-9.1 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: hanami/jruby-9.1 - environment: - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: hanami-validations-2 -group: build - -steps: -- name: install - image: ruby:2.6 - environment: - HANAMI_VALIDATIONS: "2" - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ruby -v - - gem install bundler - - bundle install --jobs=3 --retry=3 - -- name: unit - image: ruby:2.6 - environment: - HANAMI_VALIDATIONS: "2" - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - COVERAGE=true bundle exec rake spec:unit - -- name: isolation - image: ruby:2.6 - environment: - HANAMI_VALIDATIONS: "2" - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test isolation - -- name: integration - image: ruby:2.6 - environment: - HANAMI_VALIDATIONS: "2" - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - ./script/test integration - -- name: quality - image: ruby:2.6 - environment: - HANAMI_VALIDATIONS: "2" - CODECOV_TOKEN: - from_secret: codecov - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - CI=true bundle exec rake codecov:upload - -volumes: -- name: bundle - temp: {} - ---- -kind: pipeline -name: slack -group: build - -clone: - disable: true - -depends_on: - - hanami-validations-2 - -steps: -- name: slack - image: plugins/slack - settings: - link_names: true - webhook: - from_secret: slack - channel: dev - when: - event: - - push diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..878ff09 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: ci + +"on": + push: + paths: + - ".github/workflows/ci.yml" + - "lib/**" + - "*.gemspec" + - "spec/**" + - "Rakefile" + - "Gemfile" + - ".rubocop.yml" + pull_request: + branches: + - master + create: + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - "2.7" + - "2.6" + - "2.5" + - "2.4" + - "2.3" + - "jruby" + steps: + - uses: actions/checkout@v1 + - name: Install package dependencies + run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS" + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + - name: Install latest bundler + run: | + gem install bundler --no-document + - name: Bundle install + run: bundle install --jobs 4 --retry 3 + - name: Run all tests + run: script/ci diff --git a/LICENSE.md b/LICENSE.md index 56a5aab..ebdf22b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright © 2014-2017 Luca Guidi +Copyright © 2014-2021 Luca Guidi MIT License diff --git a/README.md b/README.md index 7eb14c1..2324d2d 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ Complete, fast and testable actions for Rack and [Hanami](http://hanamirb.org) ## Status [![Gem Version](https://badge.fury.io/rb/hanami-controller.svg)](https://badge.fury.io/rb/hanami-controller) -[![Build Status](https://ci.hanamirb.org/api/badges/hanami/controller/status.svg)](https://ci.hanamirb.org/hanami/controller) -[![CircleCI](https://circleci.com/gh/hanami/controller/tree/master.svg?style=svg)](https://circleci.com/gh/hanami/controller/tree/master) +[![CI](https://github.com/hanami/controller/workflows/ci/badge.svg?branch=master)](https://github.com/hanami/controller/actions?query=workflow%3Aci+branch%3Amaster) [![Test Coverage](https://codecov.io/gh/hanami/controller/branch/master/graph/badge.svg)](https://codecov.io/gh/hanami/controller) [![Depfu](https://badges.depfu.com/badges/7cd17419fba78b726be1353118fb01de/overview.svg)](https://depfu.com/github/hanami/controller?project=Bundler) [![Inline Docs](http://inch-ci.org/github/hanami/controller.svg)](http://inch-ci.org/github/hanami/controller) @@ -1205,6 +1204,6 @@ __Hanami::Controller__ uses [Semantic Versioning 2.0.0](http://semver.org) ## Copyright -Copyright © 2014-2017 Luca Guidi – Released under MIT License +Copyright © 2014-2021 Luca Guidi – Released under MIT License This project was formerly known as Lotus (`lotus-controller`).