Skip to content

Commit 318021a

Browse files
Merge branch 'main' into busy-lobster
2 parents 08242e6 + c3a265f commit 318021a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+5051
-3003
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ updates:
1313
- "/infra/dataform-service"
1414
schedule:
1515
interval: "weekly"
16+
cooldown:
17+
default-days: 7
1618

1719
- package-ecosystem: "terraform"
1820
directories:
1921
- "/infra/tf/"
2022
schedule:
2123
interval: "weekly"
24+
cooldown:
25+
default-days: 7
2226

2327
- package-ecosystem: "github-actions"
2428
directory: "/"
2529
schedule:
2630
interval: "weekly"
31+
cooldown:
32+
default-days: 7

.github/linters/.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
extend-ignore = E501

.github/linters/.sqlfluff

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[sqlfluff]
2+
dialect = bigquery
3+
max_line_length = 200
4+
5+
[sqlfluff:indentation]
6+
indent_unit = space
7+
tab_space_size = 2
8+
indented_using_on = False
9+
allow_implicit_indents = True
10+
11+
[sqlfluff:layout:type:binary_operator]
12+
line_position = trailing
13+
14+
[sqlfluff:rules:capitalisation.keywords]
15+
capitalisation_policy = upper
16+
17+
[sqlfluff:rules:capitalisation.types]
18+
extended_capitalisation_policy = upper
19+
20+
[sqlfluff:rules:convention.count_rows]
21+
prefer_count_0 = True
22+
23+
[sqlfluff:rules:convention.quoted_literals]
24+
preferred_quoted_literal_style = single_quotes

.github/linters/eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export default [
2222
ctx: 'readonly',
2323
constants: 'readonly',
2424
reports: 'readonly',
25-
reservations: 'readonly'
25+
reservations: 'readonly',
26+
descriptions: 'readonly'
2627
}
2728
},
2829
rules: {

.github/linters/zizmor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ rules:
22
unpinned-uses:
33
ignore:
44
- ci.yaml
5+
- infra.yaml

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121

2222
steps:
2323
- name: Checkout Code
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2525
with:
2626
fetch-depth: 0
2727
persist-credentials: false
2828

2929
- name: Lint Code Base
30-
uses: super-linter/super-linter/slim@v8.1.0
30+
uses: super-linter/super-linter/slim@v8.3.2
3131
env:
3232
DEFAULT_BRANCH: main
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -36,6 +36,8 @@ jobs:
3636
VALIDATE_MARKDOWN_PRETTIER: false
3737
VALIDATE_CHECKOV: false
3838
VALIDATE_GIT_COMMITLINT: false
39+
VALIDATE_BIOME_FORMAT: false
40+
VALIDATE_BIOME_LINT: false
3941

4042
dependabot:
4143
name: Dependabot auto-merge

.github/workflows/infra.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Terraform Apply on Changes
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "infra/**"
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
terraform:
19+
name: Terraform
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v6
25+
with:
26+
persist-credentials: false
27+
28+
- name: Authenticate with Google Cloud
29+
uses: google-github-actions/auth@v3
30+
with:
31+
project_id: "httparchive"
32+
credentials_json: "${{ secrets.GCP_SA_KEY }}"
33+
34+
- name: Set up Terraform
35+
uses: hashicorp/setup-terraform@v3.1.2
36+
37+
- name: Terraform Format Check
38+
working-directory: ./infra
39+
run: terraform fmt -check
40+
41+
- name: Initialize Terraform
42+
working-directory: ./infra
43+
run: terraform init
44+
45+
- name: Validate Terraform
46+
working-directory: ./infra
47+
run: terraform validate
48+
49+
- name: Plan Terraform
50+
working-directory: ./infra
51+
run: terraform plan -out=tfplan
52+
53+
- name: Apply Terraform
54+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
55+
working-directory: ./infra
56+
run: terraform apply -auto-approve tfplan

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
node_modules/
21
.DS_Store
3-
infra/tf/.terraform/
2+
.vscode/
3+
**/node_modules/
4+
**/.terraform/
45
.env

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
.PHONY: *
2-
31
clean:
4-
rm -rf ./infra/dataform-trigger/node_modules
5-
rm -rf ./infra/dataform-export/node_modules
62
rm -rf ./infra/bigquery-export/node_modules
7-
rm -rf infra/tf/tmp/*
3+
rm -rf ./infra/dataform-service/node_modules
84

95
tf_plan:
10-
terraform -chdir=infra/tf init -upgrade && terraform -chdir=infra/tf plan
6+
cd infra && terraform init -upgrade && terraform plan
117

128
tf_apply:
13-
terraform -chdir=infra/tf init && terraform -chdir=infra/tf apply -auto-approve
9+
cd infra && terraform init && terraform apply -auto-approve

SECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
Please report any suspected security issues to `team@httparchive.org`. We currently to not participate in a bug bounty programme.

0 commit comments

Comments
 (0)