Skip to content

Merge pull request #654 from paypay/dependabot/npm_and_yarn/json5-2.2.3 #2154

Merge pull request #654 from paypay/dependabot/npm_and_yarn/json5-2.2.3

Merge pull request #654 from paypay/dependabot/npm_and_yarn/json5-2.2.3 #2154

Workflow file for this run

name: Paypay Node SDK CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 12.x, 10.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm install
- run: npm run build --if-present
- run: npm test
- name: Test coverage
run: yarn coverage
- name: Code Climate before-build
env:
CC_TEST_REPORTER_ID: 92148e640143d0b54de61861a2786dd839f2f9b076a9da2769e5f02cd1cbd9eb
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Upload coverall reports
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Upload to CoPilot
run: bash <(curl -s https://copilot.blackducksoftware.com/ci/githubactions/scripts/upload)
- name: Code Climate after-build
env:
CC_TEST_REPORTER_ID: 92148e640143d0b54de61861a2786dd839f2f9b076a9da2769e5f02cd1cbd9eb
run: ./cc-test-reporter after-build --exit-code 0