From 9a9dfce8799a3e852390f74b5740e353222d2fe7 Mon Sep 17 00:00:00 2001 From: Jim Gay <4271+saturnflyer@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:16:08 -0400 Subject: [PATCH] Initial commit --- .github/dependabot.yml | 11 +++++++ .github/workflows/test.yml | 64 ++++++++++++++++++++++++++++++++++++++ Gemfile | 15 +++++++++ 3 files changed, 90 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/test.yml create mode 100644 Gemfile diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..de904ff --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: 'bundler' + directory: '/' + schedule: + interval: 'weekly' + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e8e99f0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,64 @@ +# 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: Testing + +on: + push: + branches-ignore: [master] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Test + runs-on: ubuntu-latest + strategy: + matrix: + version: ["3.3"] + env: + NOTIFY_SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + NOTIFY_SLACK_NOTIFY_CHANNEL: "oss-notices" + NOTIFY_CURRENT_REPOSITORY_URL: "${{ github.server_url }}/${{ github.repository }}" + NOTIFY_TEST_RUN_ID: "${{ github.run_id }}" + CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.version }} + bundler-cache: true + - name: Update Bundle + run: bundle check || bundle install + - name: Set ownership + run: | + # this is to fix GIT not liking owner of the checkout dir + git config --global --add safe.directory "$GITHUB_WORKSPACE" + - uses: amancevice/setup-code-climate@v2 + with: + cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }} + - run: cc-test-reporter before-build + - name: Test + run: bundle exec rake + - run: cc-test-reporter after-build + if: ${{ github.event_name != 'pull_request' }} + + linter: + name: Linter + runs-on: ubuntu-latest + strategy: + matrix: + version: ["3.3"] + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.version }} + bundler-cache: true + - run: bundle exec standardrb diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..fae36d4 --- /dev/null +++ b/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +# Ruby style guide +gem "standard" + +# Start debugger with binding.b [https://github.com/ruby/debug] +# gem "debug" + +# Test coverage +gem "simplecov" + +# Release management +gem "reissue"