From 246760a1ed487afd4cba22d8f9f0e55c03a4f3f5 Mon Sep 17 00:00:00 2001 From: Adam Stegman Date: Fri, 5 Jan 2024 20:20:08 +0000 Subject: [PATCH 1/3] Update GH actions --- .github/workflows/main.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8e55deb..a076b55 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -11,14 +11,14 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: ruby-version: '2.6' - - uses: actions/cache@v1 + - uses: actions/cache@v3 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} @@ -34,7 +34,7 @@ jobs: run: | COVERAGE=true bundle exec rspec - name: Upload coverage results - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v4 if: always() with: name: coverage-report From 2ba5ae625e6a404733fb248e55783fd064e86b37 Mon Sep 17 00:00:00 2001 From: Adam Stegman Date: Fri, 5 Jan 2024 20:23:31 +0000 Subject: [PATCH 2/3] Add Ruby matrix --- .github/workflows/main.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a076b55..f47ac1e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,6 +9,12 @@ jobs: # https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix strategy: fail-fast: false + matrix: + ruby-version: + - '3.0' + - '3.2' + - '3.3' + - head steps: - uses: actions/checkout@v4 @@ -16,7 +22,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6' + ruby-version: ${{ matrix.ruby-version }} - uses: actions/cache@v3 with: @@ -27,7 +33,7 @@ jobs: - name: Bundle Install run: | - gem install bundler -v '1.17.3' + gem install bundler bundle install --jobs 4 --retry 3 - name: Run tests @@ -37,5 +43,5 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: coverage-report + name: coverage-report-ruby-${{ matrix.ruby-version }} path: coverage From f2f249bba1ec0a9ae560ebaf488caab01829e618 Mon Sep 17 00:00:00 2001 From: Adam Stegman Date: Fri, 5 Jan 2024 20:34:43 +0000 Subject: [PATCH 3/3] Use upstream GH actions config Updated with details specific to this project, like coverage --- .github/workflows/main.yaml | 49 +++++++++++++------------------------ 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f47ac1e..d8dbbd6 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,47 +1,32 @@ -name: Main +name: CI on: [push] jobs: - vm-job: + build: runs-on: ubuntu-latest - - # https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix strategy: fail-fast: false matrix: ruby-version: - '3.0' + - '3.1' - '3.2' - '3.3' - head steps: - - uses: actions/checkout@v4 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - - - uses: actions/cache@v3 - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems- - - - name: Bundle Install - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - - - name: Run tests - run: | - COVERAGE=true bundle exec rspec - - name: Upload coverage results - uses: actions/upload-artifact@v4 - if: always() - with: - name: coverage-report-ruby-${{ matrix.ruby-version }} - path: coverage + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Run tests + run: COVERAGE=true bundle exec rspec + - name: Upload coverage results + uses: actions/upload-artifact@v4 + if: always() + with: + name: coverage-report-ruby-${{ matrix.ruby-version }} + path: coverage