Skip to content

Commit

Permalink
Merge pull request #11 from Invoca/STORY-19279_setup_automated_mainte…
Browse files Browse the repository at this point in the history
…nance

Story 19279 setup automated maintenance
  • Loading branch information
dcaddell authored Sep 6, 2024
2 parents ab70157 + ac735f9 commit 954afca
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 8 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
---
name: Pipeline
on: [push]
on:
push:
schedule:
- cron: '0 1 * * 1' # Every Monday at 1AM UTC
jobs:
ruby-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.versions.outputs.supported_versions }}
steps:
- id: versions
uses: Invoca/supported_ruby_versions_action@main

tests:
name: Unit Tests
runs-on: ubuntu-latest
needs: ruby-versions
strategy:
fail-fast: false
matrix:
ruby: [2.4, 2.5, 2.7, '3.0', 3.1]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
gemfile:
- Gemfile
- gemfiles/unlocked.gemfile
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 2.2.29
bundler-cache: true
- name: Unit tests
run: bundle exec rake test
- uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 5
command: bundle exec rake test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
pkg

test/reports/*
gemfiles/*.lock
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.5
3.1.4
7 changes: 7 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

require "appraisal"

appraise "unlocked" do
# empty block to generate an unlocked Gemfile for CI
end
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# ruby '2.4.2'
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in attr_default.gemspec
gemspec

group :development do
gem 'appraisal'
gem 'minitest'
gem 'minitest-reporters'
gem 'rake'
Expand Down
8 changes: 7 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ GEM
remote: https://rubygems.org/
specs:
ansi (1.5.0)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
builder (3.2.3)
minitest (5.15.0)
minitest-reporters (1.4.2)
Expand All @@ -16,15 +20,17 @@ GEM
ruby-progressbar
rake (13.0.1)
ruby-progressbar (1.10.1)
thor (1.3.2)

PLATFORMS
ruby

DEPENDENCIES
appraisal
attr_comparable!
minitest
minitest-reporters
rake

BUNDLED WITH
2.2.29
2.3.22
12 changes: 12 additions & 0 deletions gemfiles/unlocked.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was generated by Appraisal

source "https://rubygems.org"

group :development do
gem "appraisal"
gem "minitest"
gem "minitest-reporters"
gem "rake"
end

gemspec path: "../"

0 comments on commit 954afca

Please sign in to comment.