fix(acl): prevent strategy access to unbound resources #920
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
| # 本文件 tego 与 tego-standard 保持同步, 但是两边 test 命令有微小差异 | |
| name: Code Inspector | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| paths-ignore: | |
| - '.github/workflows/**' | |
| - '**/*.md' | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| paths-ignore: | |
| - '.github/workflows/**' | |
| - '**/*.md' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| test: | |
| name: Test | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Test | |
| run: pnpm test -- --run --reporter=default --reporter=github-actions | |
| test-coverage: | |
| name: Test Coverage | |
| # Temporarily disabled due to low coverage; enable by removing this guard when coverage is ready. | |
| if: false | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Test coverage | |
| run: pnpm vitest --coverage.enabled true | |
| - name: Report coverage | |
| if: always() | |
| uses: davelosert/vitest-coverage-report-action@v2 |