diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08b7f74..0647725 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,10 @@ name: CI on: - - push - - pull_request + push: + branches: + - main + pull_request: jobs: test: @@ -14,13 +16,13 @@ jobs: - 2.7 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: textbook/git-checkout-submodule-action@2.1.1 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{matrix.ruby}} - - name: Install dependencies - run: bundle install --without dev lint - - name: Run tests - run: bundle exec rake + - uses: actions/checkout@v2 + - uses: textbook/git-checkout-submodule-action@2.1.1 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + - name: Install dependencies + run: bundle install --without dev lint + - name: Run tests + run: bundle exec rake diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9ca2b51 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +name: Lint + +on: + - pull_request + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: git fetch --no-tags --prune --depth=10 origin +refs/heads/*:refs/remotes/origin/* + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + - name: Install dependencies + run: bundle install --without dev development default + - name: Run pronto + run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ github.token }}" pronto run -f github_status github_pr -c origin/${{ github.base_ref }}