From db43bcda6d94f8bb344b39d5f1a9efe66f6420a1 Mon Sep 17 00:00:00 2001 From: Reegan Viljoen Date: Sun, 18 Aug 2024 22:12:06 +0200 Subject: [PATCH] add ci --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 27 ------------------------ 2 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ed9f2a3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + name: Ruby ${{ matrix.ruby }} + + strategy: + fail-fast: false + matrix: + include: + # Ruby 3.2 + - ruby_version: "3.2" + rails_version: "7.0" + - ruby_version: "3.2" + rails_version: "7.1" + - ruby_version: "3.2" + rails_version: "7.2" + + # Ruby 3.3 + - ruby_version: "3.3" + rails_version: "7.0" + - ruby_version: "3.3" + rails_version: "7.1" + - ruby_version: "3.3" + rails_version: "7.2" + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby_version }} + bundler-cache: true + - name: Build and test + run: | + bundle exec appraisal rails-${{ matrix.rails_version }} bundle diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 37a9318..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Ruby - -on: - push: - branches: - - main - - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - name: Ruby ${{ matrix.ruby }} - strategy: - matrix: - ruby: - - '3.3.0' - - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - name: Run the default task - run: bundle exec rake