-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Kevin-Umali/anitomo
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 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,58 @@ | ||
name: Lint and Code Quality Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # change this to your default branch if it's not named 'main' | ||
pull_request: | ||
branches: | ||
- main # change this to your default branch if it's not named 'main' | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js with cache | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
eslint: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run ESLint | ||
run: npx eslint './**/*.ts' | ||
|
||
codequality: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Code Climate test-reporter | ||
run: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
- name: Run Code Climate Before Build | ||
run: ./cc-test-reporter before-build | ||
|
||
- name: Run tests # Placeholder for tests, ensure you have a coverage report generated | ||
run: echo "Replace this with your test command." | ||
|
||
- name: Run Code Climate After Build | ||
run: | | ||
./cc-test-reporter after-build --exit-code $? | ||