chore(deps-dev): bump knip from 5.86.0 to 6.13.1 #1018
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
| name: Push | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'main' | |
| - 'v*' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| env: | |
| OLLAMA_MODEL: 'llama3.1:8b' | |
| OLLAMA_EMBEDDING_MODEL: 'mxbai-embed-large:latest' | |
| jobs: | |
| lint-and-test: | |
| name: Lint & Test | |
| if: "!contains(github.event.head_commit.message, 'skip ci')" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| cache-dependency-path: 'package-lock.json' | |
| # Install npm version from volta config to ensure consistent dependency resolution | |
| - name: Install npm version from volta config | |
| run: | | |
| NPM_VERSION=$(node -p "require('./package.json').volta.npm") | |
| echo "Installing npm@$NPM_VERSION" | |
| npm install -g npm@$NPM_VERSION | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Run knip (dead code detection) | |
| run: npm run knip | |
| - name: Run build | |
| run: npm run build | |
| # To save the cost, comment out the following steps | |
| # - name: Cache Ollama models and data | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: | | |
| # ~/.ollama | |
| # key: ollama-${{ runner.os }}-${{ hashFiles('**/modelfile') }}-v2 | |
| # restore-keys: | | |
| # ollama-${{ runner.os }}-${{ hashFiles('**/modelfile') }}- | |
| # ollama-${{ runner.os }}- | |
| # - name: Run Ollama | |
| # uses: ai-action/setup-ollama@v1 | |
| # - name: Pull Ollama models (if not cached) | |
| # run: | | |
| # if ! ollama list | grep -q "${{ env.OLLAMA_MODEL }}"; then | |
| # echo "Pulling ${{ env.OLLAMA_MODEL }}..." | |
| # ollama pull ${{ env.OLLAMA_MODEL }} | |
| # else | |
| # echo "${{ env.OLLAMA_MODEL }} already available" | |
| # fi | |
| # if ! ollama list | grep -q "${{ env.OLLAMA_EMBEDDING_MODEL }}"; then | |
| # echo "Pulling ${{ env.OLLAMA_EMBEDDING_MODEL }}..." | |
| # ollama pull ${{ env.OLLAMA_EMBEDDING_MODEL }} | |
| # else | |
| # echo "${{ env.OLLAMA_EMBEDDING_MODEL }} already available" | |
| # fi | |
| # - name: Run test | |
| # run: npm run test | |
| semantic-release: | |
| name: Semantic Release - Dev | |
| needs: lint-and-test | |
| # Only run semantic-release for branches configured in release.config.dev.mjs | |
| if: | | |
| !contains(github.event.head_commit.message, 'skip ci') && ( | |
| startsWith(github.event.head_commit.message, 'feat') || | |
| startsWith(github.event.head_commit.message, 'fix') || | |
| startsWith(github.event.head_commit.message, 'refactor') || | |
| startsWith(github.event.head_commit.message, 'perf') || | |
| startsWith(github.event.head_commit.message, 'revert') || | |
| startsWith(github.event.head_commit.message, 'bump') || | |
| startsWith(github.event.head_commit.message, 'localize') | |
| ) | |
| uses: ./.github/workflows/semantic-release.yml | |
| with: | |
| is-dev-release: true | |
| skip-checks: true | |
| secrets: inherit |