Skip to content

Edited index.cjs and index.mjs to be runnable by pipeline. Added exam… #541

Edited index.cjs and index.mjs to be runnable by pipeline. Added exam…

Edited index.cjs and index.mjs to be runnable by pipeline. Added exam… #541

Workflow file for this run

name: Validate
on:
push:
paths-ignore:
- '**.md'
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# actively maintained versions at the time of writing (Oct 4th, 2024)
# https://nodejs.org/en/about/previous-releases
node-version: ['18.x', '20.x', '22.x', 'latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm install
- name: Test
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
run: npm test
- name: Run esm-example
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
OP_VAULT_ID: ${{ secrets.OP_SERVICE_ACCOUNT_VAULT_ID }}
run: npm run esm-example
- name: Run commonjs-example
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
OP_VAULT_ID: ${{ secrets.OP_SERVICE_ACCOUNT_VAULT_ID }}
run: npm run commonjs-example
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm install
- name: Style
run: npm run prettier
- name: Lint
run: npm run eslint