Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CI to GitHub Actions #245

Merged
merged 3 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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: build

on: [pull_request, push]

jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby:
- '3.1'
- '3.0'
- '2.7'
- '2.6'
- '2.5'
- '2.4'
- '2.3'
- '2.2'
- '2.1'
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion lib/stupidedi/versions/common/element_types/r.rb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ def to_x12(truncate = true)
if rounded.zero?
"0" * definition.min_length
else
sign + rounded.abs.to_s("F").
base = rounded.abs
base = base.is_a?(BigDecimal) ? base : BigDecimal(base)
sign + base.to_s("F").
gsub(/^0+/, ""). # leading zeros
gsub(/0+$/, ""). # trailing zeros
gsub(/\.$/, ""). # trailing decimal point
Expand Down