vzakharchenko/keycloak-api-gateway

View on GitHub
.github/workflows/nodejs.yml

Summary

Maintainability
Test Coverage
# 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

name: Node.js 10.x, 12.x, 13.x, 14.x, 15.x CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest
    environment: GITHUB
    env:
      COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
    strategy:
      matrix:
        node-version: [12.x, 14.x, 15.x, 16.x]

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm i
    - run: npm run lint
    - run: npm run test
    - run: node ./node_modules/coveralls/bin/coveralls.js < .coverage/lcov.info
    - run: npm run build
    - run: cd examples/reactJSExample/development && npm i
    - run: cd examples/reactJSExample/development && npm run lint
    - run: cd examples/reactJSExample/development && npm run build
    - run: cd examples/reactJSExample/production && npm i
    - run: cd examples/reactJSExample/production && npm run lint
    - run: cd examples/reactJSExample/production && npm run build
    - run: cd examples/multiTenantReactJSExample/development && npm i
    - run: cd examples/multiTenantReactJSExample/development && npm run lint
    - run: cd examples/multiTenantReactJSExample/development && npm run build
    - run: cd examples/multiTenantReactJSExample/production && npm i
    - run: cd examples/multiTenantReactJSExample/production && npm run lint
    - run: cd examples/multiTenantReactJSExample/production && npm run build
    - run: cd examples/multiTenantReactJSExample/tenantSelectorApp && npm i
    - run: cd examples/multiTenantReactJSExample/tenantSelectorApp && npm run lint && npm run build
    - run: cd examples/crossTenantReactJSExample/development && npm i
    - run: cd examples/crossTenantReactJSExample/development && npm run lint
    - run: cd examples/crossTenantReactJSExample/development && npm run build
    - run: cd examples/crossTenantReactJSExample/production && npm i
    - run: cd examples/crossTenantReactJSExample/production && npm run lint
    - run: cd examples/crossTenantReactJSExample/production && npm run build
    - run: cd examples/crossTenantReactJSExample/tenantSelectorApp && npm i
    - run: cd examples/crossTenantReactJSExample/tenantSelectorApp && npm run lint && npm run build
    - run: cd examples/customStorageExample/customStorage && npm i
    - run: cd examples/customStorageExample/customStorage && npm run lint
    - run: cd examples/customStorageExample/customStorage && npm run build
    - run: cd examples/customStorageExample/development && npm i
    - run: cd examples/customStorageExample/development && npm run lint
    - run: cd examples/customStorageExample/development && npm run build
    - run: cd examples/customStorageExample/production && npm i
    - run: cd examples/customStorageExample/production && npm run lint
    - run: cd examples/customStorageExample/production && npm run build