Skip to content

Node.js

Node.js #103

Workflow file for this run

name: "Node.js"
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ develop ]
schedule:
- cron: '42 18 * * 6'
jobs:
lts_versions:
name: "Get versions"
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: echo "::set-output name=matrix::$(curl -s https://raw.githubusercontent.com/fvdm/nodejs-versions/main/lts-current.json)"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
name: "Node"
needs: lts_versions
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.lts_versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Test on Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: git fetch --prune --unshallow
- run: npm install
- run: npm test
env:
testTimeout: ${{ secrets.testTimeout }}
DOTEST_NOCOV: ${{ secrets.DOTEST_NOCOV }}
DOTEST_MINCOV: ${{ secrets.DOTEST_MINCOV }}
DOTEST_COVFUNCTIONS: 100
- run: npm audit --production
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
if: always()
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ matrix.node-version }}
parallel: true
good_build:
name: "Good build"
needs: build
runs-on: ubuntu-latest
steps:
- run: echo "Build was sucessfull"
finish:
name: "Finish"
needs: build
if: always()
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true