Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #3

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #3

Workflow file for this run

---
name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
# Rails 4.2 is open ended, but people usually stopped at using it with 2.4
- ruby: "2.4"
rails: "4_2"
# Rails 5.0 requires 2.2.2 minimum, 2.4.x was maximum
- ruby: "2.4"
rails: "5_0"
# Rails 5.1 requires 2.2.2 minimum, 2.5.x was maximum
- ruby: "2.4"
rails: "5_1"
- ruby: "2.5"
rails: "5_1"
# Rails 5.2 requires 2.2.2 minimum, 2.6.x was maximum
- ruby: "2.4"
rails: "5_2"
- ruby: "2.5"
rails: "5_2"
- ruby: "2.6"
rails: "5_2"
# Rails 6.0 requires 2.5.x minimum, 2.7.x was maximum
- ruby: "2.5"
rails: "6_0"
- ruby: "2.6"
rails: "6_0"
- ruby: "2.7"
rails: "6_0"
# Rails 6.1 requires 2.5.x minimum and is open ended
- ruby: "2.5"
rails: "6_1"
- ruby: "2.6"
rails: "6_1"
- ruby: "2.7"
rails: "6_1"
- ruby: "3.0"
rails: "6_1"
- ruby: "3.1"
rails: "6_1"
- ruby: "3.2"
rails: "6_1"
# Rails 7.0 requires 2.7.x minimum and is open ended
- ruby: "2.7"
rails: "7_0"
- ruby: "3.0"
rails: "7_0"
- ruby: "3.1"
rails: "7_0"
- ruby: "3.2"
rails: "7_0"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: ${{ matrix.rails == '4_2' && '1.17.3' || 'default' }}
bundler-cache: true
- name: Run tests
run: bundle exec rspec
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage/coverage.json
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run Rubocop
run: bundle exec rubocop
upload-coverage:
needs: tests
runs-on: ubuntu-latest
if: ${{ github.repository == 'jejacks0n/navigasmic' }}
steps:
- uses: actions/checkout@v4
- name: Download code coverage artifacts
uses: actions/[email protected]
with:
name: code-coverage-report
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageLocations: ${{github.workspace}}/coverage.json:simplecov