From 4c6e90887bc47906effc5aa8294acf5f676c6379 Mon Sep 17 00:00:00 2001 From: Johny Ho Date: Sun, 7 Apr 2024 07:08:07 -0700 Subject: [PATCH] Migrate to github workflow --- .circleci/config.yml | 62 --------------------------------- .github/workflows/build.yml | 37 ++++++++++++++++++++ Gemfile.rails61 => Gemfile.61 | 0 Gemfile.rails70 => Gemfile.70 | 0 Gemfile.rails71 => Gemfile.71 | 0 Gemfile.rails60 => Gemfile.main | 2 +- 6 files changed, 38 insertions(+), 63 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build.yml rename Gemfile.rails61 => Gemfile.61 (100%) rename Gemfile.rails70 => Gemfile.70 (100%) rename Gemfile.rails71 => Gemfile.71 (100%) rename Gemfile.rails60 => Gemfile.main (63%) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index bc5a2df..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,62 +0,0 @@ -version: 2.1 - -orbs: - ruby: circleci/ruby@0.1.2 - -executors: - ruby30: - docker: - - image: circleci/ruby:3.0-node-browsers - ruby27: - docker: - - image: circleci/ruby:2.7-node-browsers - ruby26: - docker: - - image: circleci/ruby:2.6-node-browsers - -jobs: - props-template: - parameters: - ruby-version: - type: executor - gemfile: - type: string - executor: << parameters.ruby-version >> - steps: - - checkout - - run: - name: Which bundler? - command: bundle -v - - run: - name: Using Gemfile - command: mv -f ./<< parameters.gemfile >> ./Gemfile - - run: - name: Bundle install - command: bundle install - - run: - name: Standard - command: bundle exec rake standard - - run: - name: Rspec - command: bundle exec rspec - -workflows: - tests: - jobs: - - props-template: - matrix: - parameters: - gemfile: - - Gemfile.rails60 - - Gemfile.rails61 - - Gemfile.rails70 - - Gemfile.rails71 - ruby-version: - - ruby26 - - ruby27 - - ruby30 - exclude: - - gemfile: Gemfile.rails70 - ruby-version: ruby26 - - gemfile: Gemfile.rails71 - ruby-version: ruby26 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2640dfa --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build +on: + push: + pull_request: + schedule: + - cron: '* * * * 1' + workflow_dispatch: + +jobs: + build: + name: Ruby ${{ matrix.ruby }}. Rails ${{ matrix.version }} + strategy: + fail-fast: false + matrix: + ruby: ['3.3', '3.2', '3.1'] + version: ['61', 70', '71', 'main'] + + runs-on: 'ubuntu-latest' + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Setup project + run: | + mv Gemfile.${{ matrix.version }} Gemfile + bundle install + bundle update + - name: Run standard + run: bundle exec rake standard + - name: Run test + run: bundle exec rake test + diff --git a/Gemfile.rails61 b/Gemfile.61 similarity index 100% rename from Gemfile.rails61 rename to Gemfile.61 diff --git a/Gemfile.rails70 b/Gemfile.70 similarity index 100% rename from Gemfile.rails70 rename to Gemfile.70 diff --git a/Gemfile.rails71 b/Gemfile.71 similarity index 100% rename from Gemfile.rails71 rename to Gemfile.71 diff --git a/Gemfile.rails60 b/Gemfile.main similarity index 63% rename from Gemfile.rails60 rename to Gemfile.main index d93fc9c..7dfbddf 100644 --- a/Gemfile.rails60 +++ b/Gemfile.main @@ -3,5 +3,5 @@ gemspec gem "rspec" gem "byebug" -gem "rails", "~> 6.0.0" +gem "rails", git: 'https://github.com/rails/rails', ref: 'main' gem "standard", group: [:development, :test]