Skip to content

Chore: Setup publishing npm package via trusted publisher #98

Chore: Setup publishing npm package via trusted publisher

Chore: Setup publishing npm package via trusted publisher #98

Workflow file for this run

name: Test
on:
push:
branches:
- '**'
env:
NODE_VERSION: '18'
jobs:
install:
name: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-cache-${{ hashFiles('**/package-lock.json') }}
- name: Install
working-directory: .
run: npm install
lint:
name: lint
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-cache-${{ hashFiles('**/package-lock.json') }}
- name: Lint
working-directory: .
run: npm run lint
prettier:
name: prettier
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-cache-${{ hashFiles('**/package-lock.json') }}
- name: Prettier
working-directory: .
run: npm run prettier
jest:
name: jest
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-cache-${{ hashFiles('**/package-lock.json') }}
- name: Jest
working-directory: .
run: npm run jest -- --coverage