CI/CD Integration
Integrate vis into your CI/CD pipelines for automated builds, testing, and dependency management
CI/CD Integration
Integrate vis into your continuous integration and deployment pipelines.
GitHub Actions
Build and Test
Only build and test affected projects in pull requests:
name: CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for affected detection
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build affected projects
run: vis affected build --base=origin/main
- name: Test affected projects
run: vis affected test --base=origin/mainDependency Health Checks
Run scheduled dependency checks:
name: Dependency Check
on:
schedule:
- cron: "0 9 * * 1" # Every Monday at 9am
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Check for outdated dependencies
run: vis check --format json > deps-report.json
- name: Security audit
run: vis check --security --exit-code
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: dependency-report
path: deps-report.jsonTask Caching
Cache task runner artifacts between CI runs:
- name: Cache vis task runner
uses: actions/cache@v4
with:
path: .task-runner-cache
key: vis-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
vis-cache-${{ runner.os }}-Enforcing Dependency Policies
Use --exit-code to fail the pipeline when outdated dependencies are found:
- name: Enforce patch updates
run: vis check --target patch --exit-codeUse --security to catch vulnerabilities:
- name: Security gate
run: vis check --security --exit-codeGenerating Reports
Export JSON reports for monitoring dashboards or Slack notifications:
- name: Generate reports
run: |
vis check --format json > check-results.json
vis check --security --format json > security-results.json