Skip to content

Readme update & fixed version error #52

Readme update & fixed version error

Readme update & fixed version error #52

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Setup Bundler
run: |
gem install bundler
bundle config set --local path 'vendor/bundle'
bundle lock --add-platform x86_64-linux
bundle lock --add-platform ruby
bundle install --jobs 4
- name: Run tests
run: bundle exec rake test
env:
COVERAGE: true
CHATGPT_API_KEY: 'test-key'
- name: Upload coverage to CodeClimate
if: github.ref == 'refs/heads/main' && matrix.ruby-version == '3.2'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
./cc-test-reporter after-build --exit-code $?
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: coverage-report-ruby-${{ matrix.ruby-version }}
path: coverage/
retention-days: 14 # Optional: specify how long to keep artifacts
if-no-files-found: error # Optional: fail if no files are found