-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
738 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
shopt -s globstar | ||
|
||
bundle exec erblint app/{cells,views}/**/*.erb | ||
|
||
# Store the return code of the erblint execution | ||
EXIT_CODE=$? | ||
|
||
shopt -u globstar | ||
|
||
exit $EXIT_CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
REPORT_NAME=$1 | ||
EVENT_PAYLOAD_FILE=$2 | ||
|
||
PRID=`jq ".number // .check_run.pull_requests[0].number" $EVENT_PAYLOAD_FILE` | ||
SHA=`jq -r ".pull_request.head.sha // .check_run.head_sha // .after" $EVENT_PAYLOAD_FILE` | ||
|
||
if [ $PRID = "null" ] | ||
then | ||
bash <(curl -s https://codecov.io/bash) -n $REPORT_NAME -C $SHA | ||
else | ||
bash <(curl -s https://codecov.io/bash) -n $REPORT_NAME -C $SHA -P $PRID | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "[CI] Lint" | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- release/* | ||
- "*-stable" | ||
pull_request: | ||
branches-ignore: | ||
- "chore/l10n*" | ||
|
||
env: | ||
CI: "true" | ||
SIMPLECOV: "true" | ||
RUBY_VERSION: 2.6.6 | ||
|
||
jobs: | ||
lint: | ||
name: Lint code | ||
runs-on: ubuntu-latest | ||
if: "!startsWith(github.head_ref, 'chore/l10n')" | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: rokroskar/[email protected] | ||
if: "github.ref != 'refs/heads/develop'" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Get npm cache directory path | ||
id: npm-cache-dir-path | ||
run: echo "::set-output name=dir::$(npm get cache)-lint" | ||
- uses: actions/cache@v2 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir-path.outputs.dir }} | ||
key: npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
npm- | ||
- name: Install JS dependencies | ||
run: npm ci | ||
- run: bundle exec rubocop -P | ||
name: Lint Ruby files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.5.3 | ||
2.6.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.