From ac814f334a9a3b8890e09b3aa9653a372daba32d Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Wed, 4 Sep 2024 14:21:35 -0500 Subject: [PATCH] ci: Add healthchecks --- .github/workflows/stats.yml | 4 ++-- stats/steampipe/README.md | 3 +++ stats/steampipe/pixi.toml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index 9ae0d5b..99a7165 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml @@ -30,9 +30,9 @@ jobs: - run: pixi run plugins working-directory: ./stats/steampipe/ # FIXME Throw error if failure to connect - - run: pixi run github + - run: pixi run github_hc working-directory: ./stats/steampipe/ - - run: pixi run twitter + - run: pixi run twitter_hc working-directory: ./stats/steampipe/ # TODO - run: pixi run slack - run: pixi run upload_hf diff --git a/stats/steampipe/README.md b/stats/steampipe/README.md index 612f915..67e4ffb 100644 --- a/stats/steampipe/README.md +++ b/stats/steampipe/README.md @@ -1,3 +1,6 @@ +![GitHub Stats](https://img.shields.io/endpoint?url=https%3A%2F%2Fhealthchecks.io%2Fb%2F2%2Fd2febac8-1214-4c89-aa9c-a3f2c77b3995.shields) +![Twitter Stats](https://img.shields.io/endpoint?url=https%3A%2F%2Fhealthchecks.io%2Fb%2F2%2F5fd77e2f-16ea-4514-bd06-a49e710aab37.shields) + ## Notes https://steampipe.io/docs/integrations/gitpod diff --git a/stats/steampipe/pixi.toml b/stats/steampipe/pixi.toml index 617b24a..11759f6 100644 --- a/stats/steampipe/pixi.toml +++ b/stats/steampipe/pixi.toml @@ -9,7 +9,9 @@ version = "0.1.0" [tasks] plugins = "steampipe plugin install github twitter --progress=false" twitter = "steampipe query twitter_users.sql --output json | jq '.rows[0].public_metrics + {timestamp: now|tostring}' >> hf_stats/steampipe/twitter_users.json" +twitter_hc = { cmd = "curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/39c783d5-b697-4eb5-b677-05bae13a2490", depends_on = ["twitter"] } github = "steampipe query github.sql --output json | jq '.rows[0] + {timestamp: now|tostring}' >> hf_stats/steampipe/github.json" +github_hc = { cmd = "curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/017c8a09-9531-4206-a479-aa51a2209931", depends_on = ["github"] } download_hf = "huggingface-cli download nf-core/stats --local-dir hf_stats --repo-type dataset --quiet" upload_hf = "huggingface-cli upload nf-core/stats hf_stats --repo-type dataset --quiet"