diff --git a/.github/workflows/overflow-test.yaml b/.github/workflows/overflow-test.yaml index bfedf83..00eafa0 100644 --- a/.github/workflows/overflow-test.yaml +++ b/.github/workflows/overflow-test.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest name: Overflow Test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Generate Test Summary id: generate-summary @@ -23,7 +23,7 @@ jobs: - name: If there is an overflow summary, archive it if: ${{steps.generate-summary.outputs.Overflow}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{steps.generate-summary.outputs.Overflow}} path: ${{steps.generate-summary.outputs.Overflow}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7cd87f3..90ca794 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest name: Smoke Test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Generate Test Summary id: generate-summary @@ -18,3 +18,6 @@ jobs: - name: If there are alerts, echo them if: ${{steps.generate-summary.outputs.alerts}} run: echo "${{steps.generate-summary.outputs.alerts}}" + + - name: Echo the thermometer + run: echo "${{steps.generate-summary.outputs.thermometer}}" diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index bbcceb7..dd4d2f1 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest name: Unit test steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' diff --git a/README.md b/README.md index f0ef6e1..d75ef97 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,12 @@ watch over Continuous Integration pipelines for all eternity. ## Outputs -Two outputs might be produced: +Up to three outputs might be produced: + +- `thermometer`: this will contain stand-alone text with a color-coded list + of test metrics that can serve as an overview of the state of the test suite + on CI/CD. This is generated on every execution of Ciclops. + It is *always* generated. - `alerts`: this will contain stand-alone text with systematic failures detected by CIclops. It is meant to enable further steps in the calling @@ -97,7 +102,11 @@ There are two advanced cases we want to call attention to: called `Overflow`. 2. Monitoring with chatops \ - CIclops will create a series of alerts when systematic failures are detected. + Ciclops will generate a "thermometer" on every execution, offering a + color-coded overview of the test health. This thermometer is included in + the GitHub summary, and in addition, is exported as an output in plain + text, which can be sent via chatops. + In addition, Ciclops will create a series of alerts when systematic failures are detected. By "systematic", we mean cases such as: - all test combinations have failed @@ -131,6 +140,13 @@ The following snippet shows how to use these features: path: ${{steps.generate-summary.outputs.Overflow}} retention-days: 7 + - name: Get a slack message with the Ciclops thermometer + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_USERNAME: cnpg-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_MESSAGE: ${{steps.generate-summary.outputs.thermometer}} + - name: If there are alerts, send them over Slack if: ${{steps.generate-summary.outputs.alerts}} uses: rtCamp/action-slack-notify@v2 diff --git a/action.yaml b/action.yaml index abb6486..3127fde 100644 --- a/action.yaml +++ b/action.yaml @@ -22,6 +22,8 @@ inputs: outputs: alerts: description: 'Any systematic failures found by CIclops' + thermometer: + description: 'A color-coded health meter' Overflow: description: 'The name of the file where the full report was written, on oveflow' runs: