chore: fix lint errors #9
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: Lint if snapshots change | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "**" | |
paths: | |
- ".github/workflows/lint.yaml" | |
- "test/aidbox_sdk/snapshots/**" | |
- "resources/sdk/**" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Merge TypeScript SDK files | |
run: | | |
cp -r -u resources/sdk/typescript/* test/aidbox_sdk/snapshots/typescript/ | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
cache-dependency-path: test/aidbox_sdk/snapshots/typescript/package-lock.json | |
# - name: Cache Node modules | |
# uses: actions/cache@v3 | |
# with: | |
# path: | | |
# ~/.npm | |
# **/node_modules | |
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
# restore-keys: | | |
# ${{ runner.os }}-node- | |
- name: Install system and client dependencies | |
run: | | |
sudo apt -y update | |
cd test/aidbox_sdk/snapshots/typescript && npm ci | |
- name: Run ESLint | |
run: cd test/aidbox_sdk/snapshots/typescript && npm run lint |