Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Aug 9, 2023
2 parents 85653ec + a520b25 commit 6428842
Show file tree
Hide file tree
Showing 605 changed files with 24,927 additions and 36,102 deletions.
45 changes: 22 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.4.1
codecov: codecov/codecov@3.2.4
browser-tools: circleci/browser-tools@1.4.3
codecov: codecov/codecov@3.2.5
node: circleci/node@5.1.0

push_and_pr_builds: &push_and_pr_builds
Expand Down Expand Up @@ -45,7 +45,7 @@ experiment_job: &experiment_job
executors:
base-docker-small:
docker:
- image: cimg/base:stable
- image: cimg/base:current
resource_class: small
node-docker-medium:
docker:
Expand All @@ -61,11 +61,11 @@ executors:
resource_class: xlarge
jdk-docker-2xlarge:
docker:
- image: cimg/openjdk:19.0-node
- image: cimg/openjdk:20.0-node
resource_class: 2xlarge
macos-medium:
macos:
xcode: 13.4.1
xcode: 14.3.1
resource_class: macos.x86.medium.gen2

commands:
Expand All @@ -85,6 +85,9 @@ commands:
- when:
condition: << parameters.save-git-cache >>
steps:
- run:
name: 'Garbage Collection for Git'
command: git gc --auto
- save_cache:
name: 'Save Git Cache'
key: git-cache-{{ arch }}-v2-{{ .Branch }}-{{ .Revision }}
Expand Down Expand Up @@ -132,6 +135,9 @@ commands:
- run:
name: 'Get Pinned Chrome Version'
command: ./.circleci/get_pinned_chrome_version.sh
- run:
name: 'Update list of available apt packages'
command: sudo apt update
- browser-tools/install-chrome:
# chrome-version is set in ./.circleci/get_pinned_chrome_version.sh, see files for details.
replace-existing: true
Expand Down Expand Up @@ -188,6 +194,12 @@ jobs:
name: 'Initialize Workspace'
command: cp .circleci/maybe_gracefully_halt.sh /tmp/workspace
- teardown_vm
initialize_mac_os:
executor:
name: macos-medium
steps:
- checkout_repo:
save-git-cache: true
checks:
executor:
name: node-docker-medium
Expand Down Expand Up @@ -366,8 +378,7 @@ jobs:
executor:
name: macos-medium
steps:
- setup_vm:
save-git-cache: true
- setup_vm
- enable_safari_automation
- run:
name: '⭐ Browser Tests (Safari) ⭐'
Expand Down Expand Up @@ -396,17 +407,6 @@ jobs:
command: node build-system/pr-check/browser-tests.js --browser=edge
- store_test_output
- teardown_vm
performance_tests:
executor:
name: node-docker-xlarge
steps:
- setup_vm
- install_chrome
- run:
name: '⭐ Performance Tests ⭐'
command: node build-system/pr-check/performance-tests.js
- store_test_output
- teardown_vm
experiment_build:
executor:
name: node-docker-xlarge
Expand Down Expand Up @@ -493,6 +493,9 @@ workflows:
- initialize_repository:
name: 'Initialize Repository'
<<: *push_and_pr_builds
- initialize_mac_os:
name: 'Initialize for Mac OS'
<<: *push_and_pr_builds
- checks:
name: 'Checks'
<<: *push_and_pr_builds
Expand Down Expand Up @@ -581,6 +584,7 @@ workflows:
name: 'Browser Tests (Safari)'
<<: *push_and_pr_builds
requires:
- 'Initialize for Mac OS'
- 'Nomodule Build (Test)'
- browser_tests_firefox:
name: 'Browser Tests (Firefox)'
Expand Down Expand Up @@ -616,11 +620,6 @@ workflows:
<<: *push_and_pr_builds
requires:
- 'Experiment << matrix.exp >> Build'
# TODO(wg-performance, #12128): This takes 30 mins and fails regularly.
# - performance_tests:
# <<: *push_builds_only
# requires:
# - 'Nomodule Build (Test)'

'Release':
jobs:
Expand Down
9 changes: 4 additions & 5 deletions .circleci/install_microsoft_edge.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash
#
# Script used by AMP's CI builds to install Microsoft Edge Beta on CircleCI.
# Script used by AMP's CI builds to install Microsoft Edge Stable on CircleCI.
# Reference: https://www.microsoftedgeinsider.com/en-us/download?platform=linux-deb
# TODO(wg-infra): Switch from Beta to Stable once it's available.

set -e

Expand All @@ -13,7 +12,7 @@ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microso
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
sudo rm microsoft.gpg
sudo apt update && sudo apt install microsoft-edge-beta
EDGE_BETA_BIN=`which microsoft-edge-beta`
echo "export EDGE_BETA_BIN=${EDGE_BETA_BIN}" >> $BASH_ENV
sudo apt update && sudo apt install microsoft-edge-stable
EDGE_STABLE_BIN=`which microsoft-edge-stable`
echo "export EDGE_STABLE_BIN=${EDGE_STABLE_BIN}" >> $BASH_ENV
echo $(GREEN "Installation complete.")
2 changes: 1 addition & 1 deletion .circleci/install_validator_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list

echo $(GREEN "Updating and installing apt packages...")
sudo apt update && sudo apt install bazel clang python3 python3-pip protobuf-compiler
sudo apt update && sudo apt install bazel-5.4.0 clang python3 python3-pip protobuf-compiler

echo $(GREEN "Installing protobuf python module...")
pip3 install protobuf==3.19.4
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ validator/**
.*cache
.amp-dep-check
build
build-system/tasks/performance/cache
build-system/tasks/performance/results.json
dist
dist.3p
dist.tools
Expand Down
74 changes: 74 additions & 0 deletions .github/ISSUE_TEMPLATE/ga4-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: Google Analytics 4 and AMP Bug Report
description: Report a bug in GA4 and AMP integration.
labels: ['Type: Bug', 'Component: amp-analytics', 'Component: GA4']
title: "\U0001F41B Google Analytics 4 Related Bug: "
body:
- type: markdown
id: header
attributes:
value: |
Thanks for filling out this bug report. Bugs related to Google Analytics 4 and amp-analytics can be reported using the form below.
- Bugs related to the [AMP](https://amp.dev) format and cache can be reported using the form below.
- Bugs related to the [AMP WordPress Plugin](https://wordpress.org/plugins/amp/) can be reported at the [support forum](https://wordpress.org/support/plugin/amp/) or at the [`amp-wp`](https://github.com/ampproject/amp-wp/issues) repository.
- Questions about AMP uage can be asked at the [`#using-amp`](https://amphtml.slack.com/archives/C9HPA6HGB) Slack channel or at the [`amp-html`](http://stackoverflow.com/questions/tagged/amp-html) tag at Stack Overflow.
- Questions about Google Search can be asked at Google's [Help Community](https://goo.gl/utQ1KZ).
- type: textarea
id: description
attributes:
label: Description
description: A brief description of the bug.
placeholder: Describe the expected vs. the current behavior, so this issue can be directed to the correct working group for investigation.
validations:
required: true
- type: input
id: example
attributes:
label: URL where we can debug and reproduce the problem
description: If applicable, give an example web page where we can reproduce the problem.
placeholder: e.g. https://amp-dev.cdn.ampproject.org/c/s/amp.dev/
- type: textarea
id: repro_steps
attributes:
label: Reproduction Steps
description: Step-by-step instructions for reproducing the issue.
placeholder: Provide a publicly accessible URL and a reduced set of steps that clearly demonstrate the issue.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant Logs
description: Relevant logging output.
placeholder: Paste any plain-text logs here (e.g. console warnings or errors from Chrome DevTools). They will automatically be formatted as code.
render: shell
- type: dropdown
id: browsers
attributes:
label: Browser(s) Affected
description: If applicable, specify which browser(s) are affected. Select one or more options below.
multiple: true
options:
- Chrome
- Firefox
- Safari
- Edge
- UC Browser
- type: input
id: operating_systems
attributes:
label: OS(s) Affected
description: If applicable, specify which operating system(s) are affected.
placeholder: e.g. Android 11
- type: input
id: devices
attributes:
label: Device(s) Affected
description: If applicable, specify which device(s) are affected.
placeholder: e.g. Pixel 3
- type: input
id: version
attributes:
label: AMP Version Affected
description: If applicable, specify which version is affected, in the format YYMMDDHHMMXXX.
placeholder: e.g. 2101280515000
2 changes: 2 additions & 0 deletions .github/codeql/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- 'extensions/**/test/**'
81 changes: 0 additions & 81 deletions .github/dependabot.yml

This file was deleted.

12 changes: 5 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
permissions:
contents: read

paths-ignore:
- 'extensions/**/test/**'

jobs:
analyze:
name: Analyze
Expand All @@ -32,20 +29,21 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8662eabe0e9f338a07350b7fd050732745f93848 # v2.3.1
uses: github/codeql-action/init@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3
with:
config-file: ./.github/codeql/config.yml
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8662eabe0e9f338a07350b7fd050732745f93848 # v2.3.1
uses: github/codeql-action/analyze@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3
with:
category: '/language:${{matrix.language}}'
10 changes: 5 additions & 5 deletions .github/workflows/cross-platform-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
runs-on: ${{ matrix.platform }}-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout Repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set Up Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: lts/*
- name: Install Dependencies
Expand All @@ -44,11 +44,11 @@ jobs:
environment: create_issue_on_error
steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Create issue on error
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # v2.9.1
Expand Down
Loading

0 comments on commit 6428842

Please sign in to comment.