diff --git a/.github/workflows/check-grow-link-integrity.yaml b/.github/workflows/check-grow-link-integrity.yaml deleted file mode 100644 index 49c36d6e4eb..00000000000 --- a/.github/workflows/check-grow-link-integrity.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: 'Check: Grow link integrity' - -on: - push: - paths: - - 'pages/content/**' -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Checking grow link integrity - run: | - gulp buildSamples - gulp importAll - gulp lintGrow diff --git a/.github/workflows/lint-js.yaml b/.github/workflows/lint-js.yaml index 429226fa4ef..40b4de81395 100644 --- a/.github/workflows/lint-js.yaml +++ b/.github/workflows/lint-js.yaml @@ -2,6 +2,7 @@ name: 'Lint: JavaScript' on: + workflow_dispatch: push: paths: - '**/*.js' @@ -16,15 +17,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages - run: npm install + run: npm ci - name: Linting JavaScript files run: | diff --git a/.github/workflows/lint-yaml.yaml b/.github/workflows/lint-yaml.yaml index 281559f36ab..e9623721a29 100644 --- a/.github/workflows/lint-yaml.yaml +++ b/.github/workflows/lint-yaml.yaml @@ -2,6 +2,7 @@ name: 'Lint: YAML' on: + workflow_dispatch: push: paths: - '**/*.yml' @@ -18,15 +19,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages - run: npm install + run: npm ci - name: Linting YAML files run: | diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml deleted file mode 100644 index 75b5e240fc4..00000000000 --- a/.github/workflows/nightly.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: 'Nightly' - -on: - schedule: - - cron: '0 8 * * *' - -jobs: - trigger: - runs-on: ubuntu-latest - steps: - - name: Deploying to staging - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: 'Release: Staging' - token: ${{ secrets.NIGHTLY_WORKFLOW_GITHUB_PAT }} - - - name: Deploying to production - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: 'Release: Production' - token: ${{ secrets.NIGHTLY_WORKFLOW_GITHUB_PAT }} - ref: refs/heads/production-amp-dev diff --git a/.github/workflows/release-production.yaml b/.github/workflows/release-production.yaml deleted file mode 100644 index 388057ca22c..00000000000 --- a/.github/workflows/release-production.yaml +++ /dev/null @@ -1,216 +0,0 @@ ---- -name: 'Release: Production' - -on: - workflow_dispatch: - push: - branches: - - production-amp-dev - -jobs: - queue: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'outdated_runs' - cancel_others: true - skip_after_successful_duplicate: true - paths_ignore: '["**/README.md", "**/docs/**"]' - do_not_skip: '["workflow_dispatch", "schedule"]' - verify: - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm ci - - - name: Running tests - run: | - gulp updateTestResources - gulp buildPixiFunctions - gulp lintNode - gulp lintYaml - npm run test:platform - npm run test:playground - npm run test:pixi - prepare: - needs: verify - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Preparing build - env: - APP_ENV: production - AMP_DOC_TOKEN: ${{ secrets.AMP_DOC_TOKEN }} - AMP_DEV_PIXI_APIS_KEY: ${{ secrets.AMP_DEV_PIXI_APIS_KEY }} - run: | - gulp buildPrepare - - - name: Storing build artifacts - uses: actions/upload-artifact@v4 - with: - name: build-setup - path: artifacts/setup.tar.gz - - build: - env: - APP_ENV: production - needs: prepare - strategy: - matrix: - language: - [ - 'en', - 'de', - 'fr', - 'ar', - 'es', - 'it', - 'id', - 'ja', - 'ko', - 'pt_BR', - 'ru', - 'tr', - 'zh_CN', - 'pl', - 'vi', - ] - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Setting up Python - uses: actions/setup-python@v5 - with: - python-version: '3.9' - -# - uses: actions/cache@v3 -# with: -# path: ${{ env.pythonLocation }} -# key: ${{ env.pythonLocation }} - - - name: Installing Grow - run: | - sudo apt-get install libyaml-dev - pip install grow --upgrade-strategy eager - - - name: Fetching build artifacts - uses: actions/download-artifact@v4 - with: - name: build-setup - path: artifacts - - - name: Unpacking artifacts - run: | - gulp unpackArtifacts - - - name: Building pages - run: | - gulp buildPages --locales ${{ matrix.language }} - - - name: Storing build artifacts - uses: actions/upload-artifact@v4 - with: - name: pages-${{ github.run_id }}-${{ matrix.language }} - path: artifacts - - deploy: - needs: build - runs-on: ubuntu-latest - environment: Production - env: - APP_ENV: production - CLOUDSDK_CORE_DISABLE_PROMPTS: 1 - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - id: auth - uses: google-github-actions/auth@v0 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Setting up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0 - - - name: Fetching build artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - - - name: Unpacking artifacts - run: | - gulp unpackArtifacts - - - name: Finalizing build - run: | - gulp buildFinalize - npm run smoke-test -- --colors - # npm run test:pixi:e2e - - - name: Deploying - run: | - gcloud components update --quiet - gcloud components install beta --quiet - npx gulp deploy diff --git a/.github/workflows/release-staging.yaml b/.github/workflows/release-staging.yaml deleted file mode 100644 index 44d0da13911..00000000000 --- a/.github/workflows/release-staging.yaml +++ /dev/null @@ -1,227 +0,0 @@ ---- -name: 'Release: Staging' - -on: - workflow_dispatch: - push: - branches: - - future - -jobs: - queue: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: 'outdated_runs' - cancel_others: true - skip_after_successful_duplicate: true - paths_ignore: '["**/README.md", "**/docs/**"]' - do_not_skip: '["workflow_dispatch", "schedule"]' - - verify: - runs-on: ubuntu-latest - environment: Staging - permissions: - contents: 'read' - id-token: 'write' - steps: - - id: auth - uses: google-github-actions/auth@v0 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Setting up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0 - - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm ci - - - name: Running tests - run: | - gulp updateTestResources - gulp buildPixiFunctions - gulp lintNode - gulp lintYaml - npm run test:platform - npm run test:playground - npm run test:pixi - prepare: - needs: verify - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Preparing build - env: - APP_ENV: staging - AMP_DOC_TOKEN: ${{ secrets.AMP_DOC_TOKEN }} - AMP_DEV_PIXI_APIS_KEY: ${{ secrets.AMP_DEV_PIXI_APIS_KEY }} - run: | - gulp buildPrepare - - - name: Storing build artifacts - uses: actions/upload-artifact@v4 - with: - name: build-setup - path: artifacts/setup.tar.gz - - build: - env: - APP_ENV: staging - needs: prepare - strategy: - matrix: - language: - [ - 'en', - 'de', - 'fr', - 'ar', - 'es', - 'it', - 'id', - 'ja', - 'ko', - 'pt_BR', - 'ru', - 'tr', - 'zh_CN', - 'pl', - 'vi', - ] - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Setting up Python - uses: actions/setup-python@v5 - with: - python-version: '3.9' - -# - uses: actions/cache@v3 -# with: -# path: ${{ env.pythonLocation }} -# key: ${{ env.pythonLocation }} - - - name: Installing Grow - run: | - sudo apt-get install libyaml-dev - pip install grow --upgrade-strategy eager - - - name: Fetching build artifacts - uses: actions/download-artifact@v4 - with: - name: build-setup - path: artifacts - - - name: Unpacking artifacts - run: | - gulp unpackArtifacts - - - name: Building pages - run: | - gulp buildPages --locales ${{ matrix.language }} - - - name: Storing build artifacts - uses: actions/upload-artifact@v4 - with: - name: pages-${{ github.run_id }}-${{ matrix.language }} - path: artifacts - - deploy: - needs: build - runs-on: ubuntu-latest - environment: Staging - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Setting up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - - - name: Fetching build artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - - - name: Unpacking artifacts - run: | - gulp unpackArtifacts - - - name: Finalizing build - run: | - gulp buildFinalize - npm run smoke-test -- --colors - # npm run test:pixi:e2e - - - name: Deploying - run: | - gcloud config set app/cloud_build_timeout 1800 - gcloud app deploy --quiet --version=1 diff --git a/.github/workflows/release-static-production.yml b/.github/workflows/release-static-production.yaml similarity index 81% rename from .github/workflows/release-static-production.yml rename to .github/workflows/release-static-production.yaml index 84b07fc59f3..f147090c4b5 100644 --- a/.github/workflows/release-static-production.yml +++ b/.github/workflows/release-static-production.yaml @@ -31,12 +31,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages run: npm ci @@ -59,15 +54,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages - run: npm install + run: npm ci - name: Preparing build env: @@ -115,26 +105,16 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages - run: npm install + run: npm ci - name: Setting up Python uses: actions/setup-python@v5 with: python-version: '3.9' -# - uses: actions/cache@v3 -# with: -# path: ${{ env.pythonLocation }} -# key: ${{ env.pythonLocation }} - - name: Installing Grow run: | sudo apt-get install libyaml-dev @@ -175,15 +155,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages - run: npm install + run: npm ci - name: Fetching build artifacts uses: actions/download-artifact@v4 diff --git a/.github/workflows/test-default.yml b/.github/workflows/test-default.yaml similarity index 100% rename from .github/workflows/test-default.yml rename to .github/workflows/test-default.yaml diff --git a/.github/workflows/test-grow-extensions.yaml b/.github/workflows/test-grow-extensions.yaml deleted file mode 100644 index 5204b30d200..00000000000 --- a/.github/workflows/test-grow-extensions.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: 'Test: Grow extensions' - -on: - push: - paths: - - 'pages/extensions/**' - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Setting up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - uses: actions/cache@v4 - with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }} - - - name: Installing Grow - run: | - sudo apt-get install libyaml-dev - pip install grow --upgrade-strategy eager - - - name: Running Grow tests - working-directory: /home/runner/work/amp.dev/amp.dev/pages/extensions - run: | - python3 -m unittest discover -p "*_test.py" diff --git a/.github/workflows/test-pixi.yaml b/.github/workflows/test-pixi.yaml deleted file mode 100644 index 4088a178498..00000000000 --- a/.github/workflows/test-pixi.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: 'Test: Pixi' - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Cloning repository - uses: actions/checkout@v4 - - - name: Setting up Node.js - uses: actions/setup-node@v4 - with: - node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} - - - name: Installing Node.js packages - run: npm install - - - name: Running Pixi tests - run: | - gulp updateTestResources - gulp buildPixiFunctions - npm run test:pixi -- --colors diff --git a/.github/workflows/test-platform.yaml b/.github/workflows/test-platform.yaml index 0ce8c76a027..8a5f76c139b 100644 --- a/.github/workflows/test-platform.yaml +++ b/.github/workflows/test-platform.yaml @@ -2,6 +2,7 @@ name: 'Test: Platform' on: + workflow_dispatch: push: paths: - 'package.json' @@ -18,15 +19,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages - run: npm install + run: npm ci - name: Running Platform tests run: | diff --git a/.github/workflows/test-playground.yaml b/.github/workflows/test-playground.yaml index ac2a8f3a147..c4946e02c8c 100644 --- a/.github/workflows/test-playground.yaml +++ b/.github/workflows/test-playground.yaml @@ -2,6 +2,7 @@ name: 'Test: Playground' on: + workflow_dispatch: push: paths: - 'package.json' @@ -18,15 +19,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14 - - - uses: actions/cache@v4 - if: ${{ !env.ACT }} - with: - path: '**/node_modules' - key: node_modules-${{ hashFiles('**/package-lock.json') }} + cache: npm - name: Installing Node.js packages - run: npm install + run: npm ci - name: Running Playground tests run: |