GitHub Actions

This commit is contained in:
Luca Guidi 2021-01-14 15:53:19 +01:00
parent 08ffdb3bb4
commit d8dbbadd7c
No known key found for this signature in database
GPG Key ID: CD1966BB1CEAC68F
5 changed files with 49 additions and 546 deletions

View File

@ -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-node
working_directory: ~/hanami-assets
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-node
working_directory: ~/hanami-assets
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-node
working_directory: ~/hanami-assets
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-node
working_directory: ~/hanami-assets
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-node
working_directory: ~/hanami-assets
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-node
# working_directory: ~/hanami-assets
# 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-node
# working_directory: ~/hanami-assets
# 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"

View File

@ -1,350 +0,0 @@
kind: pipeline
name: ruby-2-7
group: build
steps:
- name: install
image: hanami/ruby-2.7-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ruby -v
- gem install bundler
- bundle install --jobs=3 --retry=3
- name: unit
image: hanami/ruby-2.7-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- COVERAGE=true bundle exec rake spec:unit
- name: integration
image: hanami/ruby-2.7-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ./script/test integration
- name: quality
image: hanami/ruby-2.7-node
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: hanami/ruby-2.6-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ruby -v
- gem install bundler
- bundle install --jobs=3 --retry=3
- name: unit
image: hanami/ruby-2.6-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- COVERAGE=true bundle exec rake spec:unit
- name: integration
image: hanami/ruby-2.6-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ./script/test integration
- name: quality
image: hanami/ruby-2.6-node
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: hanami/ruby-2.5-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ruby -v
- gem install bundler
- bundle install --jobs=3 --retry=3
- name: unit
image: hanami/ruby-2.5-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- COVERAGE=true bundle exec rake spec:unit
- name: integration
image: hanami/ruby-2.5-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ./script/test integration
- name: quality
image: hanami/ruby-2.5-node
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: hanami/ruby-2.4-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ruby -v
- gem install bundler
- bundle install --jobs=3 --retry=3
- name: unit
image: hanami/ruby-2.4-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- COVERAGE=true bundle exec rake spec:unit
- name: integration
image: hanami/ruby-2.4-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ./script/test integration
- name: quality
image: hanami/ruby-2.4-node
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: hanami/ruby-2.3-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ruby -v
- gem install bundler
- bundle install --jobs=3 --retry=3
- name: unit
image: hanami/ruby-2.3-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- COVERAGE=true bundle exec rake spec:unit
- name: integration
image: hanami/ruby-2.3-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ./script/test integration
- name: quality
image: hanami/ruby-2.3-node
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-node
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-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- COVERAGE=true bundle exec rake spec:unit
- name: integration
image: hanami/jruby-9.2-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ./script/test integration
- name: quality
image: hanami/jruby-9.2-node
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-node
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-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- COVERAGE=true bundle exec rake spec:unit
- name: integration
image: hanami/jruby-9.1-node
volumes:
- name: bundle
path: /usr/local/bundle
commands:
- ./script/test integration
- name: quality
image: hanami/jruby-9.1-node
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: slack
group: build
clone:
disable: true
depends_on:
- jruby-9-1
steps:
- name: slack
image: plugins/slack
settings:
link_names: true
webhook:
from_secret: slack
channel: dev
when:
event:
- push

46
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,46 @@
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:
- "3.0"
- "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

View File

@ -1,4 +1,4 @@
Copyright © 2014-2017 Luca Guidi
Copyright © 2014-2021 Luca Guidi
MIT License

View File

@ -5,7 +5,7 @@ Assets management for Ruby web projects
## Status
[![Gem Version](https://badge.fury.io/rb/hanami-assets.svg)](https://badge.fury.io/rb/hanami-assets)
[![CircleCI](https://circleci.com/gh/hanami/assets/tree/master.svg?style=svg)](https://circleci.com/gh/hanami/assets/tree/master)
[![CI](https://github.com/hanami/assets/workflows/ci/badge.svg?branch=unstable)](https://github.com/hanami/assets/actions?query=workflow%3Aci+branch%3Aunstable)
[![Test Coverage](https://codecov.io/gh/hanami/assets/branch/master/graph/badge.svg)](https://codecov.io/gh/hanami/assets)
[![Depfu](https://badges.depfu.com/badges/4b37347bd74042ff96477495cc16531d/overview.svg)](https://depfu.com/github/hanami/assets?project=Bundler)
[![Inline Docs](http://inch-ci.org/github/hanami/assets.svg)](http://inch-ci.org/github/hanami/assets)
@ -493,6 +493,6 @@ __Hanami::Assets__ uses [Semantic Versioning 2.0.0](http://semver.org)
## Copyright
Copyright © 2014-2020 Luca Guidi Released under MIT License
Copyright © 2014-2021 Luca Guidi Released under MIT License
This project was formerly known as Lotus (`lotus-assets`).