diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d96ae0b..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,56 +0,0 @@ -version: 2.1 - -jobs: - test: - parameters: - ruby_version: - description: "version tag for the veracross/ruby-app-base container" - type: string - - docker: - - image: veracross/ruby-app-base:ruby-<< parameters.ruby_version >> - - working_directory: ~/repo - - steps: - - checkout - - - restore_cache: - name: restore gem cache - keys: - - v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-{{ checksum "data-table.gemspec" }} - - v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}- - - v1-bundle-<< parameters.ruby_version >>- - - - run: - name: install dependencies - command: | - bundle check --path ./vendor/bundle || bundle install --jobs=3 --retry=3 --path vendor/bundle - bundle clean - - - save_cache: - name: save gem cache - paths: - - ./vendor/bundle - key: v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-{{ checksum "data-table.gemspec" }} - - - run: - name: run tests - command: | - bundle exec rspec --format RspecJunitFormatter \ - --out ./tmp/test_results/results.xml \ - --format progress - - - store_test_results: - path: ./tmp/test_results - -workflows: - test_supported_ruby_versions: - jobs: - - test: - matrix: - parameters: - ruby_version: - - '2.5' - - '2.7' - - '3.1' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fff1c2d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: ci + +on: + pull_request: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: + - '2.7' + - '3.1' + - '3.2' + - '3.3' + + name: test (ruby ${{ matrix.ruby-version }}) + + permissions: + contents: read + checks: write + + env: + BUNDLE_ONLY: default test + CI: true + + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + + - run: bundle exec rspec diff --git a/Gemfile b/Gemfile index 94ef2e9..aea6c59 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,11 @@ source "http://rubygems.org" # Specify your gem's dependencies in data-table.gemspec gemspec + +group :development, :test do + gem 'rake', '~> 12' + gem 'rspec', '~> 3' + gem 'rspec_junit_formatter' + gem 'guard', '~> 2' + gem 'guard-rspec', '~> 4' +end diff --git a/data-table.gemspec b/data-table.gemspec index ef94673..db1e834 100644 --- a/data-table.gemspec +++ b/data-table.gemspec @@ -13,12 +13,6 @@ Gem::Specification.new do |s| turning an array of hashes or ActiveRecord objects into an HTML table.) - s.add_development_dependency 'rake', '~> 12' - s.add_development_dependency 'rspec', '~> 3' - s.add_development_dependency 'rspec_junit_formatter' - s.add_development_dependency 'guard', '~> 2' - s.add_development_dependency 'guard-rspec', '~> 4' - s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }