mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-18 11:39:15 +00:00
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: BotWhatsapp Build-Test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
|
|
jobs:
|
|
############ BUILD PACKAGE ############
|
|
build-package:
|
|
name: Build Package
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- test-unit
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16.x
|
|
cache: 'yarn'
|
|
registry-url: https://registry.npmjs.org/
|
|
|
|
- run: corepack enable
|
|
|
|
- name: Install NPM Dependencies
|
|
run: yarn install --immutable --network-timeout 300000
|
|
|
|
- name: Build Package
|
|
run: yarn build
|
|
|
|
- name: Build Eslint rules
|
|
run: yarn lint:fix
|
|
|
|
############ UNIT TEST ############
|
|
test-unit:
|
|
name: Unit Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16.x
|
|
cache: 'yarn'
|
|
registry-url: https://registry.npmjs.org/
|
|
|
|
- run: corepack enable
|
|
|
|
- name: Install NPM Dependencies
|
|
run: yarn install --immutable --network-timeout 300000
|
|
|
|
- name: Unit Tests
|
|
run: yarn test
|