name: Run default rake task (tests) on PRs and main rebases

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.7
    - name: Install dependencies
      run: bundle install
    - name: Run tests (and linting)
      run: bundle exec rake

name: Run default rake task (tests) on PRs and main rebases

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.7
    - name: Install dependencies
      run: bundle install
    - name: Run tests (and linting)
      run: bundle exec rake

Change main branch for the Action running tests
Change main branch for the Action running tests

When I made this action I thought that the repository was already using
the "main" branch nomenklature.

GitHub is suggesting that repositories wait until "later this year" to
make the branch name change. They are going to have tools to make this
seamless:
https://github.com/github/renaming
