diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 93273b1..8cb675f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -5,22 +5,8 @@ on: workflows: [CI] types: [completed] branches: [main] + jobs: - deploy: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - uses: actions/checkout@v3 - - name: Tag and Push Gem - id: tag-and-push-gem - uses: discourse/publish-rubygems-action@v2 - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - GIT_EMAIL: ${{secrets.GUSTO_GIT_NAME}} - GIT_NAME: ${{secrets.GUSTO_GIT_EMAIL}} - RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} - - name: Create GitHub Release - run: gh release create v${{steps.tag-and-push-gem.outputs.gem_version}} --generate-notes - if: ${{ steps.tag-and-push-gem.outputs.new_version == 'true' }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + call-workflow-from-shared-config: + uses: rubyatscale/shared-config/.github/workflows/cd.yml@main + secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08c85f1..c1178ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,42 +1,12 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: jobs: - rspec: - runs-on: ubuntu-latest - strategy: - matrix: - ruby: - - 2.7 - # See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions - # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' - - '3.0' - - 3.1 - - 3.2 - - 3.3 - - head - env: - BUNDLE_GEMFILE: Gemfile - name: "RSpec tests: Ruby ${{ matrix.ruby }}" - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby ${{ matrix.ruby }} - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: ${{ matrix.ruby }} - - name: Run tests - run: bundle exec rspec - static_type_check: - name: "Type Check" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: head - - name: Run static type checks - run: bundle exec srb tc + call-workflow-from-shared-config: + uses: rubyatscale/shared-config/.github/workflows/ci.yml@main + secrets: inherit diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..0287d52 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,8 @@ +name: 'Close stale issues and PRs' + +on: + schedule: + - cron: '0 0 * * *' +jobs: + call-workflow-from-shared-config: + uses: rubyatscale/shared-config/.github/workflows/stale.yml@main diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 0000000..74bb1d9 --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,9 @@ +name: Label issues as "triage" + +on: + issues: + types: + - opened +jobs: + call-workflow-from-shared-config: + uses: rubyatscale/shared-config/.github/workflows/triage.yml@main diff --git a/.rubocop.yml b/.rubocop.yml index 70e1ac5..8b23ea2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,6 +13,7 @@ AllCops: NewCops: enable Exclude: - vendor/bundle/**/** + TargetRubyVersion: 2.6 Metrics/ParameterLists: Enabled: false @@ -120,3 +121,7 @@ Layout/BlockEndNewline: Naming/FileName: Exclude: - lib/packs-specification.rb + +Gemspec/DevelopmentDependencies: + Enabled: true + EnforcedStyle: gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 2a4b315..a8506a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,15 +10,18 @@ GEM ast (2.4.2) coderay (1.1.3) diff-lcs (1.5.0) - json (2.6.3) + json (2.7.2) + language_server-protocol (3.17.0.3) method_source (1.0.0) netrc (0.11.0) - parallel (1.22.1) - parser (3.1.2.1) + parallel (1.24.0) + parser (3.3.1.0) ast (~> 2.4.1) + racc pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) + racc (1.7.3) rainbow (3.1.1) rake (13.0.6) rbi (0.0.16) @@ -26,8 +29,8 @@ GEM parser (>= 2.6.4.0) sorbet-runtime (>= 0.5.9204) unparser - regexp_parser (2.6.1) - rexml (3.2.5) + regexp_parser (2.9.1) + rexml (3.2.6) rspec (3.11.0) rspec-core (~> 3.11.0) rspec-expectations (~> 3.11.0) @@ -41,19 +44,20 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.11.0) rspec-support (3.11.1) - rubocop (1.41.0) + rubocop (1.63.5) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.1.2.1) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.23.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.24.0) - parser (>= 3.1.1.0) - ruby-progressbar (1.11.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + ruby-progressbar (1.13.0) sorbet (0.5.11370) sorbet-static (= 0.5.11370) sorbet-runtime (0.5.11370) @@ -77,7 +81,7 @@ GEM thor (>= 1.2.0) yard-sorbet thor (1.2.1) - unicode-display_width (2.3.0) + unicode-display_width (2.5.0) unparser (0.6.5) diff-lcs (~> 1.3) parser (>= 3.1.0)