From 9333bf96375be5690cf58f1cb593f1ac2d39bc44 Mon Sep 17 00:00:00 2001 From: HenryNguyen5 <6404866+HenryNguyen5@users.noreply.github.com> Date: Thu, 1 Sep 2022 21:10:03 -0400 Subject: [PATCH] Add github metrics --- .github/workflows/build-publish-develop.yml | 9 +++++ .github/workflows/build-publish.yml | 9 +++++ .github/workflows/build.yml | 9 +++++ .github/workflows/changelog.yml | 8 ++++ .github/workflows/ci-core.yml | 10 ++++- .github/workflows/code-quality.yml | 16 ++++++++ .github/workflows/codeql-analysis.yml | 11 ++++- .github/workflows/dependency-check.yml | 12 +++++- .github/workflows/golangci-lint.yml | 9 ++++- .github/workflows/integration-chaos-tests.yml | 16 ++++++++ .github/workflows/integration-tests.yml | 40 +++++++++++++++++++ .github/workflows/lint-gh-workflows.yml | 8 ++++ .github/workflows/operator-ui.yml | 8 ++++ .github/workflows/performance-tests.yml | 16 ++++++++ .github/workflows/solidity.yml | 16 ++++++++ ...evelop-from-smartcontractkit-chainlink.yml | 8 ++++ 16 files changed, 200 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-publish-develop.yml b/.github/workflows/build-publish-develop.yml index eab03b011c..1c2af24f03 100644 --- a/.github/workflows/build-publish-develop.yml +++ b/.github/workflows/build-publish-develop.yml @@ -13,6 +13,15 @@ jobs: id-token: write contents: read steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: push-chainlink-develop + continue-on-error: true + - name: Checkout repository uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0 diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 68edbd47de..0844c6425e 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -16,6 +16,15 @@ jobs: id-token: write contents: read steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: build-sign-publish-chainlink + continue-on-error: true + - name: Checkout repository uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed38ba8aab..a3aea3c184 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,15 @@ jobs: build-chainlink: runs-on: ubuntu-20.04 steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: build-chainlink + continue-on-error: true + - name: Checkout repository uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0 diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 14c94ac3b9..d703236378 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -14,6 +14,14 @@ jobs: name: Changelog checker runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Changelog checker + continue-on-error: true - name: Check for changed files id: changedfiles uses: umani/changed-files@1d252c611c64289d35243fc37ece7323ea5e93e1 # Version 3.3.0 diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index cf3aff4ec4..0fba309799 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: cmd: ["go_core_tests", "go_core_race_tests"] - name: Core Tests + name: Core Tests ${{ matrix.cmd }} runs-on: ubuntu-latest env: DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable @@ -33,6 +33,14 @@ jobs: --health-timeout 5s --health-retries 5 steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Core Tests ${{ matrix.cmd }} + continue-on-error: true - name: Checkout the repo uses: actions/checkout@v2 - name: Set up Go diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 4c14cfbca2..a3657b2c92 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -13,6 +13,14 @@ jobs: name: Lint runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Lint + continue-on-error: true - name: Setup node uses: actions/setup-node@v2 with: @@ -41,6 +49,14 @@ jobs: name: Prettier Formatting runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Prettier Formatting + continue-on-error: true - name: Setup node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a489ecd7df..350ba84269 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,7 +15,7 @@ on: jobs: analyze: - name: Analyze + name: Analyze ${{ matrix.language }} runs-on: ubuntu-latest strategy: @@ -27,6 +27,15 @@ jobs: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Analyze ${{ matrix.language }} + continue-on-error: true + - name: Checkout repository uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml index 9efa2cc6f3..cdef0583a2 100644 --- a/.github/workflows/dependency-check.yml +++ b/.github/workflows/dependency-check.yml @@ -5,7 +5,7 @@ name: Dependency Vulnerability Check -on: +on: push: paths: - '**/go.mod' @@ -14,6 +14,15 @@ jobs: Go: runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Go + continue-on-error: true + - name: Check out code uses: actions/checkout@v2 @@ -30,4 +39,3 @@ jobs: uses: sonatype-nexus-community/nancy-github-action@main with: nancyVersion: "v1.0.22" - diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index fa06f0c079..a8980fd190 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,6 +22,14 @@ jobs: name: lint runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: lint + continue-on-error: true - uses: actions/checkout@v2 with: fetch-depth: 0 @@ -43,7 +51,6 @@ jobs: # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true - # Optional: if set to true then the action don't cache or restore ~/go/pkg. # skip-pkg-cache: true diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index 0bc41a8429..451ce171d6 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -14,6 +14,14 @@ jobs: name: Build Chainlink Image runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Build Chainlink Image + continue-on-error: true - name: Checkout the repo uses: actions/checkout@v2 - name: Configure AWS Credentials @@ -49,6 +57,14 @@ jobs: needs: - build-chainlink steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: EVM Chaos Tests + continue-on-error: true - name: Checkout the repo uses: actions/checkout@v2 - name: Run Tests diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3f322333bc..aeed9a990a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -13,6 +13,14 @@ jobs: name: Check Paths That Require Tests To Run runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Check Paths That Require Tests To Run + continue-on-error: true - name: Checkout the repo uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 # v2.10.2 @@ -35,6 +43,14 @@ jobs: runs-on: ubuntu-latest needs: [changes] steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Build Chainlink Image + continue-on-error: true - name: Checkout the repo uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 with: @@ -65,6 +81,14 @@ jobs: TEST_TRIGGERED_BY: core-CI-eth TEST_LOG_LEVEL: debug steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: ETH Smoke Tests + continue-on-error: true - name: Checkout the repo uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 with: @@ -122,6 +146,14 @@ jobs: RUSTUP_HOME: "/root/.rustup" FORCE_COLOR: 1 steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Solana Build Artifacts + continue-on-error: true - name: Checkout the solana repo uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 with: @@ -149,6 +181,14 @@ jobs: TEST_TRIGGERED_BY: core-CI-solana TEST_LOG_LEVEL: debug steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Solana Smoke Tests + continue-on-error: true - name: Checkout the repo uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 with: diff --git a/.github/workflows/lint-gh-workflows.yml b/.github/workflows/lint-gh-workflows.yml index f67498635d..ab39de9f5f 100644 --- a/.github/workflows/lint-gh-workflows.yml +++ b/.github/workflows/lint-gh-workflows.yml @@ -6,6 +6,14 @@ jobs: name: Validate Github Action Workflows runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Validate Github Action Workflows + continue-on-error: true - name: Check out Code uses: actions/checkout@v3 - name: Run actionlint diff --git a/.github/workflows/operator-ui.yml b/.github/workflows/operator-ui.yml index 52698be7cd..ce9774c851 100644 --- a/.github/workflows/operator-ui.yml +++ b/.github/workflows/operator-ui.yml @@ -26,6 +26,14 @@ jobs: name: Operator UI Tests runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Operator UI Tests + continue-on-error: true - name: Setup node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml index 7f2de5aa2d..6ba65cc971 100644 --- a/.github/workflows/performance-tests.yml +++ b/.github/workflows/performance-tests.yml @@ -16,6 +16,14 @@ jobs: name: Build Chainlink Image runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Build Chainlink Image + continue-on-error: true - name: Checkout the repo uses: actions/checkout@v2 - name: Configure AWS Credentials @@ -44,6 +52,14 @@ jobs: runs-on: ubuntu-latest needs: build-chainlink steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: run core evm ${{ github.event.inputs.focus }} performance tests + continue-on-error: true - name: Checkout the repo uses: actions/checkout@v2 - name: Run Tests diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index 2dd5b3378e..1a67da2d1a 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -26,6 +26,14 @@ jobs: name: Solidity Coverage runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Solidity Coverage + continue-on-error: true - name: Setup node uses: actions/setup-node@v2 with: @@ -56,6 +64,14 @@ jobs: name: Solidity runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Solidity + continue-on-error: true - name: Setup node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml b/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml index 1051237ab2..c20ef6559e 100644 --- a/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml +++ b/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml @@ -10,6 +10,14 @@ jobs: name: Sync runs-on: ubuntu-latest steps: + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@v1 + with: + basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} + this-job-name: Sync + continue-on-error: true - uses: actions/checkout@v2 with: ref: develop