-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First shot at github actions * Homegrown file_list to replace rake function * This is embarassing...
- Loading branch information
Showing
2 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | ||
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | ||
|
||
name: Ruby | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: ['3.1', '3.2', '3.3', 'head'] | ||
|
||
steps: | ||
- uses: ConorMacBride/install-package@v1 | ||
with: | ||
apt: default-jdk | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: Run tests | ||
run: bundle exec rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
require_relative 'lib/secretariat/version' | ||
require 'rake' | ||
|
||
# Rolling my own file_list to not have to rely on rake | ||
# as this breaks ruby-setup on GitHub actions | ||
# This should be good enough for now, even though | ||
# FileList does a lot more. | ||
def file_list(*patterns) | ||
patterns.map do |pattern| | ||
Dir.glob(pattern) | ||
end.flatten.reject do |file| | ||
File.basename(file).start_with?(".") | ||
end | ||
end | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'secretariat' | ||
s.version = Secretariat::VERSION | ||
|
@@ -8,7 +20,7 @@ Gem::Specification.new do |s| | |
s.description = "a tool to help generate and validate ZUGFeRD invoice xml files" | ||
s.authors = ["Jan Krutisch"] | ||
s.email = '[email protected]' | ||
s.files = FileList['lib/**/*.rb', 'bin/*.jar', 'schemas/**/*', 'README.md'] | ||
s.files = file_list('lib/**/*.rb', 'bin/*.jar', 'schemas/**/*', 'README.md') | ||
s.homepage = 'https://github.com/halfbyte/ruby-secretariat' | ||
s.license = 'Apache-2.0' | ||
|
||
|