Skip to content

Commit

Permalink
Add github actions workflow for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jhass committed Sep 13, 2020
1 parent 7b1c14a commit e5a41c7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: CI

on:
- push
- pull_request
push:
branches:
- main
pull_request:

jobs:
test:
Expand All @@ -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
17 changes: 17 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit e5a41c7

Please sign in to comment.