Sha256: 5642c3cc41584169d4c26c8aea66a8fff123c77767a60423c09b72d29523b736

Contents?: true

Size: 1.53 KB

Versions: 4

Compression:

Stored size: 1.53 KB

Contents

name: Ruby

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.0
          bundler-cache: true

      - name: Run the default task
        run: |
          gem install bundler -v 2.2.15
          bundle install
          bundle exec rubocop
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: [2.6, 2.7, 3.0]
    steps:
      - uses: actions/checkout@v2

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true

      - name: Start Gremlin server
        run: |
          docker-compose up -d --build
          sleep 3

      - name: Install deps
        run: |
          gem install bundler -v 2.2.15
          bundle install

      - name: Run tests
        run: bundle exec rspec
  publish:
    runs-on: ubuntu-latest
    needs:
      - lint
      - test
    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
    steps:
      - uses: actions/checkout@v2

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.0
          bundler-cache: true

      - name: Build gem
        run: gem build

      - name: Create credentials
        run: |
          mkdir ~/.gem
          cat << EOF > ~/.gem/credentials
          ---
          :rubygems_api_key: ${{ secrets.rubygems_api_key }}
          EOF
          chmod 0600 /home/runner/.gem/credentials

      - name: Push gem
        run: gem push *gem

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
grumlin-0.4.0 .github/workflows/main.yml
grumlin-0.3.0 .github/workflows/main.yml
grumlin-0.2.0 .github/workflows/main.yml
grumlin-0.1.3 .github/workflows/main.yml