Merge pull request #437 from Inist-CNRS/fix-csv-object #1166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [12.x, 14.x, 16.x, 18.x, 20.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install libpostal | |
run: bash ${GITHUB_WORKSPACE}/.github/workflows/install-libpostal.sh | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Install dependencies | |
env: | |
CXXFLAGS: '-I/deps/include' | |
LDFLAGS: '-L/deps/lib' | |
run: yarn run ci:install | |
- name: Rebuild node-postal (Mainly use to NodeJS 20) | |
env: | |
CXXFLAGS: '-I/deps/include' | |
LDFLAGS: '-L/deps/lib' | |
run: | | |
cd node_modules/node-postal | |
yarn run install | |
- name: Testing all packages | |
env: | |
LD_LIBRARY_PATH: '/deps/lib' | |
run: yarn run ci:test | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: run-${{ matrix.node-version }} | |
parallel: true | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |