diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8d88481 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test + +on: + pull_request: + branches: ["master"] + paths-ignore: + - 'README.md' + - LICENSE + +jobs: + test: + runs-on: ubuntu-latest + env: + BUNDLE_GEMFILE: tests/Gemfile + BUNDLE_GEMFILE.lock: tests/Gemfile.lock + + steps: + - uses: actions/checkout@v3 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + + - name: test + run: cat /etc/os-release + + - name: run bashcov + run: bundle exec bashcov ./setuper diff --git a/.simplecov b/.simplecov new file mode 100644 index 0000000..7ec8580 --- /dev/null +++ b/.simplecov @@ -0,0 +1,7 @@ +SimpleCov.start do + minimum_coverage 90 + + add_filter "debug.sh" + add_filter "/test/" + add_filter "/.git/" +end diff --git a/tests/Gemfile b/tests/Gemfile new file mode 100644 index 0000000..855562b --- /dev/null +++ b/tests/Gemfile @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +# gem "rails" + +gem "bashcov", "~> 3.1" diff --git a/tests/Gemfile.lock b/tests/Gemfile.lock new file mode 100644 index 0000000..ead47eb --- /dev/null +++ b/tests/Gemfile.lock @@ -0,0 +1,22 @@ +GEM + remote: https://rubygems.org/ + specs: + bashcov (3.1.2) + simplecov (~> 0.22.0) + docile (1.4.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + +PLATFORMS + ruby + x86_64-linux + +DEPENDENCIES + bashcov (~> 3.1) + +BUNDLED WITH + 2.5.11