diff --git a/.github/workflows/borescope.yaml b/.github/workflows/borescope.yaml new file mode 100644 index 0000000..3ee1941 --- /dev/null +++ b/.github/workflows/borescope.yaml @@ -0,0 +1,47 @@ +name: Borescope + +on: + pull_request: + push: + branches: + - main + +permissions: {} + +jobs: + borescope: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Check out Ops + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + repository: canonical/operator + ref: main + fetch-depth: 1 + path: operator + - name: Install uv + uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 + - name: Start the workload detached + working-directory: operator/examples/httpbin-demo + run: uvx --with-editable "$GITHUB_WORKSPACE" jjx -d + - name: Probe services with borescope + working-directory: operator/examples/httpbin-demo + run: | + services=$(uvx borescope --socket .jjx/socket --command services) + echo "$services" + echo "$services" | grep httpbin + echo "$services" | grep active + - name: Probe processes with borescope + working-directory: operator/examples/httpbin-demo + run: | + processes=$(uvx borescope --socket .jjx/socket --command ps) + echo "$processes" + echo "$processes" | grep gunicorn + - name: Tear down + if: always() + working-directory: operator/examples/httpbin-demo + run: uvx --with-editable "$GITHUB_WORKSPACE" jjx down