Skip to content

Fix Slack bot for npm publish failure #2498

Fix Slack bot for npm publish failure

Fix Slack bot for npm publish failure #2498

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install
- name: Check formatting
run: yarn check-formatting
- name: Lint
run: yarn lint
- name: Install depcheck
run: yarn global add depcheck
- name: Run depcheck
run: depcheck --ignores="@types/jest,serverless-step-functions"
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
node-version: [16, 18]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install
- name: Build
run: yarn build
- name: Run tests
run: yarn test
- name: Upload code coverage report
run: bash <(curl -s https://codecov.io/bash)