Develop to main (no need in release) #98
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: PR checks | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./sdk | |
steps: | |
- name: Checkout commit | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.x' | |
- name: Cache NPM # leverage npm cache on repeated workflow runs if package.json didn't change | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: yarn | |
- name: Run linter | |
run: yarn lint | |
typecheck: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./sdk | |
steps: | |
- name: Checkout commit | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.x' | |
- name: Cache NPM # leverage npm cache on repeated workflow runs if package.json didn't change | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: yarn | |
- name: Run tsc | |
run: yarn build | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./sdk | |
steps: | |
- name: Checkout commit | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.x' | |
- name: Cache NPM | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: yarn | |
- name: Run tests | |
run: yarn test |