Skip to content

docs: document array validation behavior #153

docs: document array validation behavior

docs: document array validation behavior #153

name: Lint, Test, and (Maybe) Publish
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out files
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Update to latest NPM version
run: npm i -g npm
- name: Install package dependencies
run: npm ci
- name: Lint code
run: npm run lint --if-present
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out files
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Update to latest NPM version
run: npm i -g npm
- name: Install package dependencies
run: npm ci
- name: Test code
run: npm run test --if-present
publish:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.repository_owner == 'longshotlabs' && github.ref == 'refs/heads/main' }}
needs: [lint, test]
defaults:
run:
shell: bash
steps:
- name: Check out files
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Update to latest NPM version
run: npm i -g npm
- name: Install package dependencies
run: npm ci
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}