Repository navigation
docs(security): update config path and acknowledge cue subprocess #128
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [master, develop] | |
| pull_request: | |
| branches: [master, develop] | |
| jobs: | |
| lint-and-test: | |
| name: Lint, Test & Security | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Add uv to PATH | |
| run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-extras | |
| - name: Install ansible-core (for ansible-vault) | |
| run: | | |
| uv pip install ansible-core | |
| - name: Install cue (for schema validation tests) | |
| run: | | |
| CUE_VERSION=v0.16.1 | |
| mkdir -p "$HOME/.local/bin" | |
| curl -fsSL "https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/cue_${CUE_VERSION}_linux_amd64.tar.gz" \ | |
| | tar -xz -C "$HOME/.local/bin" cue | |
| "$HOME/.local/bin/cue" version | |
| - name: Run pre-commit checks | |
| uses: pre-commit/action@v3.0.1 | |
| - name: Code complexity analysis | |
| run: | | |
| echo "=== Cyclomatic Complexity (grade C and worse) ===" | |
| uv run radon cc src/vaultctl -n C --no-assert -s --total-average | |
| echo "" | |
| echo "=== Maintainability Index (grade B and worse) ===" | |
| uv run radon mi src/vaultctl --min B -s | |
| - name: Run tests with coverage | |
| run: | | |
| uv run pytest --cov=vaultctl --cov-report=xml --cov-report=term-missing --cov-fail-under=70 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.python-version == '3.13' | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build: | |
| name: Build package | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Add uv to PATH | |
| run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Build package | |
| run: uv build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ |