isaacgr/jaysonic

View on GitHub
.github/workflows/main.yml

Summary

Maintainability
Test Coverage
# This is a basic workflow to help you get started with Actions

name: CI

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

# Controls when the workflow will run
on: [push, pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - name: Checkout
        uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"
      - name: Install packages
        run: npm install
      - name: Prepare
        run: npm run prepare
      - name: Coverage
        run: npm run coverage
      - name: Coveralls Prep?
        run: npm run coveralls
      - name: Coveralls GitHub Action
        uses: coverallsapp/github-action@1.1.3
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}