unhappychoice/lita-irasutoya

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: test

on: [push]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.2.2
      - name: Install bundler
        run: gem install bundler
      - name: Install dependencies
        run: bundle install --jobs 4
      - name: Run test
        run: bundle exec rubocop lib
  test:
    runs-on: ubuntu-latest
    services:
      redis:
        image: redis
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 6379:6379
    strategy:
      matrix:
        ruby: ['3.2.2', '3.1.4', '3.0.6', '2.7.8', '2.6.10']
    steps:
      - uses: actions/checkout@master
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
      - name: Install bundler
        run: gem install bundler
      - name: Install dependencies
        run: bundle install --jobs 4
      - name: Run test
        env:
          COVERAGE: true
          CODECOV_TOKEN: 0fdf6f58-374b-4082-bada-d3407b6eaf81
        run: bundle exec rspec