Skip to content

chore: add definitions and examples of all APIs, other changes [skip-ci] #46

chore: add definitions and examples of all APIs, other changes [skip-ci]

chore: add definitions and examples of all APIs, other changes [skip-ci] #46

Workflow file for this run

name: CI
on:
push:
branches: [ master, github-action ]
pull_request:
branches: [ master ]
jobs:
build:
if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
node_version: [ 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 19.x, 20.x, 21.x, 22.x ] # [6.x, 8.x, 10.x, 12.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Restore packages
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Copy appropriate package.json
run: |
if [[ ${{ matrix.node_version }} == 12* ]]; then
cp package-below-node-16.json package.json
elif [[ ${{ matrix.node_version }} == 13* ]]; then
cp package-below-node-16.json package.json
elif [[ ${{ matrix.node_version }} == 14* ]]; then
cp package-below-node-16.json package.json
elif [[ ${{ matrix.node_version }} == 15* ]]; then
cp package-below-node-16.json package.json
elif [[ ${{ matrix.node_version }} == 16* ]]; then
cp package-below-node-16.json package.json
elif [[ ${{ matrix.node_version }} == 17* ]]; then
cp package-below-node-16.json package.json
elif [[ ${{ matrix.node_version }} == 19* ]]; then
cp package-below-node-16.json package.json
fi
- name: yarn install, yarn test:coverage
run: |
yarn install
yarn test:coverage
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ runner.os }}
- name: Notification
if: always()
id: slack
uses: wingify/[email protected]
with:
channel-id: 'vwo-fs-fme-sdk-job-status' # 'fs-review-team'
slack-message: "<!here> Node.js/JavaScript FME SDK Test on *Node-${{ matrix.node_version }}* and *${{ matrix.os }}* got *${{job.status}}* ${{job.status == 'success' && ':heavy_check_mark:' || ':x:'}} \nCommit: `${{github.event.head_commit.message}}`. \nCheck the latest build: https://github.com/wingify/vwo-fme-node-sdk/actions"
color: "${{job.status == 'success' && '#00FF00' || '#FF0000'}}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}