🧹 Remove dead code and unused methods in apiClient.ts #79
This file contains hidden or 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
| # .github/workflows/ci.yml | |
| name: Node.js CI & Build | |
| on: | |
| push: | |
| branches: [ "main", "develop" ] # Or your primary branches | |
| pull_request: | |
| branches: [ "main", "develop" ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest # Using Ubuntu as a common CI runner | |
| strategy: | |
| matrix: | |
| node-version: [18.x] # Specify Node.js versions to test against | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" # Enable caching for npm dependencies | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: TypeScript compile check | |
| run: npm run build:electron:main && npm run build:electron:preload && npx tsc --project src/renderer/tsconfig.json --noEmit | |
| - name: Build application | |
| run: npm run build | |
| - name: Package application (Linux AppImage) | |
| if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') | |
| run: npm run package -- --linux AppImage --dir | |
| # Optional: Upload build artifacts (e.g., the AppImage) | |
| # - name: Upload Linux Build Artifact | |
| # uses: actions/upload-artifact@v3 | |
| # with: | |
| # name: switchbot-client-linux-appimage | |
| # path: release/*.AppImage # Adjust path as needed | |
| # if-no-files-found: error # Optional: fail if no file is found |