Skip to content

Commit 5bef99a

Browse files
authored
Merge branch 'main' into cookies-2025
2 parents 513afa1 + 0c42602 commit 5bef99a

28 files changed

Lines changed: 235 additions & 244 deletions

.github/workflows/check-translations-lengths.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Checkout Code
34-
uses: actions/checkout@v5
34+
uses: actions/checkout@v6
3535
with:
3636
path: this_run
3737
# Full git history is needed to get a proper list of changed files
3838
fetch-depth: 0
3939
- name: Checkout Code
4040
if: github.event_name == 'pull_request'
41-
uses: actions/checkout@v5
41+
uses: actions/checkout@v6
4242
with:
4343
path: original
4444
ref: main

.github/workflows/code-static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
language: ['javascript', 'python']
3333
steps:
3434
- name: Checkout repository
35-
uses: actions/checkout@v5
35+
uses: actions/checkout@v6
3636
- name: Set up Python 3.12
3737
if: ${{ matrix.language == 'python' }}
3838
uses: actions/setup-python@v6

.github/workflows/compress-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
github.event.pull_request.head.repo.full_name == github.repository)
4646
steps:
4747
- name: Checkout Branch
48-
uses: actions/checkout@v5
48+
uses: actions/checkout@v6
4949
- name: Run Image Compression
5050
id: calibre
5151
uses: calibreapp/image-actions@main

.github/workflows/linter.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout Code
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
2323
with:
2424
# Full git history is needed to get a proper list of changed files within `super-linter`
2525
fetch-depth: 0
@@ -44,7 +44,6 @@ jobs:
4444
VALIDATE_MARKDOWN: true
4545
VALIDATE_PYTHON_PYLINT: true
4646
VALIDATE_PYTHON_FLAKE8: true
47-
VALIDATE_SQLFLUFF: true
4847
VALIDATE_YAML: true
4948

5049
dependabot:
@@ -73,7 +72,6 @@ jobs:
7372
steps.metadata.outputs.update-type == 'version-update:semver-minor'
7473
) && (
7574
contains(steps.metadata.outputs.dependency-names, 'prettier') ||
76-
contains(steps.metadata.outputs.dependency-names, 'sqlfluff') ||
7775
contains(steps.metadata.outputs.dependency-names, 'super-linter')
7876
)
7977
run: gh pr merge --admin --squash "$PR_URL"

.github/workflows/lintsql.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ on:
77
workflow_dispatch:
88
pull_request:
99
paths:
10-
src/requirements.txt
10+
- src/requirements.txt
11+
- 'sql/**.sql'
1112
jobs:
1213
lint:
1314
name: Lint SQL
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Checkout Code
17-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1819
with:
1920
# Full git history is needed to get a proper list of changed files within `super-linter`
2021
fetch-depth: 0
@@ -23,9 +24,46 @@ jobs:
2324
with:
2425
python-version: '3.12'
2526
- name: Lint SQL code
26-
if: |
27-
github.event_name == 'workflow_dispatch' ||
28-
startsWith(github.event.pull_request.title,'Bump sqlfluff') == true
2927
run: |
30-
pip install -r src/requirements.txt
31-
sqlfluff lint sql -p 4
28+
pip install -r src/requirements.txt -q
29+
if [ "${{ github.event_name }}" == "workflow_dispatch" ] || \
30+
[[ "${{ github.event.pull_request.title }}" == Bump\ sqlfluff* ]]; then
31+
# Lint all SQL files for workflow_dispatch or sqlfluff bumps
32+
sqlfluff lint sql -p 4
33+
else
34+
# Lint only changed SQL files
35+
git diff --name-only --diff-filter=ACMRT origin/${{ github.base_ref }}...HEAD \
36+
| grep '\.sql$' \
37+
| xargs -r sqlfluff lint
38+
fi
39+
40+
41+
dependabot:
42+
name: Dependabot auto-merge
43+
runs-on: ubuntu-latest
44+
needs: lint
45+
if: |
46+
github.event.pull_request.user.login == 'dependabot[bot]' &&
47+
github.repository == 'HTTPArchive/almanac.httparchive.org'
48+
49+
permissions:
50+
contents: write
51+
pull-requests: write
52+
53+
steps:
54+
- name: Dependabot metadata
55+
id: metadata
56+
uses: dependabot/fetch-metadata@v2
57+
with:
58+
github-token: "${{ secrets.GITHUB_TOKEN }}"
59+
60+
- name: Enable auto-merge for Dependabot PRs
61+
if: |
62+
(
63+
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
64+
steps.metadata.outputs.update-type == 'version-update:semver-minor'
65+
) && contains(steps.metadata.outputs.dependency-names, 'sqlfluff')
66+
run: gh pr merge --admin --squash "$PR_URL"
67+
env:
68+
PR_URL: ${{github.event.pull_request.html_url}}
69+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/predeploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Checkout branch
34-
uses: actions/checkout@v5
34+
uses: actions/checkout@v6
3535
- name: Setup Node.js for use with actions
3636
uses: actions/setup-node@v6
3737
with:

.github/workflows/production-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
if: github.repository == 'HTTPArchive/almanac.httparchive.org'
2525
steps:
2626
- name: Checkout branch
27-
uses: actions/checkout@v5
27+
uses: actions/checkout@v6
2828
- name: Set the list of URLs for Lighthouse to check
2929
run: ./src/tools/scripts/set_lighthouse_urls.sh -p
3030
- name: Audit URLs using Lighthouse

.github/workflows/test-template-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
if: github.repository == 'HTTPArchive/almanac.httparchive.org'
3030
steps:
3131
- name: Checkout Code
32-
uses: actions/checkout@v5
32+
uses: actions/checkout@v6
3333
with:
3434
fetch-depth: 0
3535
- name: Setup Node.js for use with actions

.github/workflows/test_website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
if: github.repository == 'HTTPArchive/almanac.httparchive.org'
2222
steps:
2323
- name: Checkout branch
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2525
with:
2626
# Full git history is needed to get a proper list of changed files within `super-linter`
2727
fetch-depth: 0

sql/2019/fonts/06_32.sql

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
#standardSQL
22
# 06_32: Top font hosts
33
SELECT
4-
*
5-
FROM (
6-
SELECT
7-
client,
8-
NET.HOST(url) AS host,
9-
COUNT(0) AS freq,
10-
SUM(COUNT(0)) OVER (PARTITION BY client) AS total,
11-
ROUND(COUNT(0) * 100 / SUM(COUNT(0)) OVER (PARTITION BY client), 2) AS pct
12-
FROM
13-
`httparchive.almanac.requests`
14-
WHERE
15-
date = '2019-07-01' AND
16-
type = 'font'
17-
GROUP BY
18-
client,
19-
host
20-
ORDER BY
21-
freq / total DESC
22-
)
4+
client,
5+
NET.HOST(url) AS host,
6+
COUNT(0) AS freq,
7+
SUM(COUNT(0)) OVER (PARTITION BY client) AS total,
8+
ROUND(COUNT(0) * 100 / SUM(COUNT(0)) OVER (PARTITION BY client), 2) AS pct
9+
FROM
10+
`httparchive.almanac.requests`
11+
WHERE
12+
date = '2019-07-01' AND
13+
type = 'font'
14+
GROUP BY
15+
client,
16+
host
17+
ORDER BY
18+
freq / total DESC
2319
LIMIT 100

0 commit comments

Comments
 (0)