chore(test): setup Jest, ts-jest and mock-fs (#53) #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build the CLI | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- "src/**" | |
- "package.json" | |
- ".github/workflows/build.yml" | |
push: | |
branches: [main] | |
paths: | |
- "src/**" | |
- "package.json" | |
- ".github/workflows/build.yml" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install modules | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
cache: "yarn" | |
registry-url: "https://registry.npmjs.org" | |
cache-dependency-path: "**/yarn.lock" | |
- run: yarn | |
- run: yarn build:prod |