tarantx/tarant-db-persist

View on GitHub
.github/workflows/build.yml

Summary

Maintainability
Test Coverage
name: Build & Publish
on:
  push:
    branches:
      - master
  pull_request:
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@master
      - name: Cache ✨
        uses: actions/cache@v2
        id: cache
        with:
          path: node_modules
          key: ${{ runner.os }}-cache-${{ hashFiles('package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-cache-
      - name: install dependencies
        run: npm install
      - name: test
        run: npm run test:cov
      - name: Publish coverage
        uses: paambaati/codeclimate-action@v3.0.0
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }}
      - uses: kanekotic/merge-release@master
        if: github.event_name != 'pull_request'
        env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
            NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}