Skip to content

Commit 3d8f849

Browse files
committed
udpate ci
1 parent 11c36bd commit 3d8f849

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/iterating_api_endpoint_ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
jobs:
2222
ci: # ci using environments from workspace 'iterating_api_endpoint'
23-
uses: tinybirdco/ci/.github/workflows/ci.yml@v4.0.0
23+
uses: tinybirdco/ci/.github/workflows/ci.yml@support-env
2424
with:
2525
data_project_dir: iterating_api_endpoint
26+
tb_env: test
2627
secrets:
2728
tb_admin_token: ${{ secrets.ITERATING_API_ENDPOINT_TOKEN }} # set the Workspace admin token in GitHub secrets
2829
tb_host: https://api.tinybird.co
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
NODE include_top_pages
2+
SQL >
3+
SELECT 1

iterating_api_endpoint/pipes/top_pages.pipe

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ DESCRIPTION >
66

77
TOKEN "dashboard" READ
88

9+
INCLUDE "../includes/top_pages_$TB_ENV.incl"
10+
911
NODE endpoint
1012
DESCRIPTION >
1113
Group by pagepath and calcualte hits and visits
@@ -16,7 +18,8 @@ SQL >
1618
select
1719
pathname,
1820
uniqMerge(visits) as visits,
19-
countMerge(hits) as hits
21+
countMerge(hits) as hits,
22+
1 as $TB_ENV
2023
from
2124
analytics_pages_mv
2225
where
@@ -31,7 +34,7 @@ SQL >
3134
and date <= today()
3235
{% end %}
3336
group by
34-
pathname
37+
pathname, $TB_ENV
3538
order by
3639
visits desc
3740
limit {{Int32(skip, 0)}},{{Int32(limit, 50)}}

0 commit comments

Comments
 (0)