-
Notifications
You must be signed in to change notification settings - Fork 7
35 lines (35 loc) · 1.18 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Push
on:
push:
branches:
- dev
jobs:
codeclimate:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- uses: c-py/action-dotenv-to-setenv@v2
with:
env-file: .env
- name: Cache node modules
id: cache
uses: actions/cache@v2
with:
path: ${{env.INSTALL_CACHE_PATH}}
key: ${{ runner.os }}-build-${{env.INSTALL_CACHE_NAME}}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-build-${{env.INSTALL_CACHE_NAME}}-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install --force
- name: Testing
run: npm run test:unit
- name: Sending to Code Climate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
export GIT_SHA=${GITHUB_SHA}
export GIT_BRANCH=${GITHUB_REF#refs/heads/}
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter after-build -r $CC_TEST_REPORTER_ID