Skip to content

[stable] Include theme-check-docs-updater data folder in final bundled dist #12372

[stable] Include theme-check-docs-updater data folder in final bundled dist

[stable] Include theme-check-docs-updater data folder in final bundled dist #12372

Workflow file for this run

name: shopify-cli
on:
workflow_dispatch:
inputs:
branch-name:
type: string
description: 'Branch'
required: true
default: 'main'
node-version:
description: 'Node version'
required: true
default: '18.12.0'
type: choice
options:
- 18.12.0
- 20.2.0
os:
description: 'Operating system'
required: true
default: 'ubuntu-latest'
type: choice
options:
- ubuntu-latest
- windows-latest
- macos-latest
debug-enabled:
type: boolean
description: 'Enable tmate debugging'
required: true
default: true
push:
branches:
- main
- stable/3.*
pull_request:
merge_group:
concurrency:
group: shopify-cli-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
DEBUG: '1'
SHOPIFY_CLI_ENV: development
SHOPIFY_CONFIG: debug
PNPM_VERSION: '8.7.0'
BUNDLE_WITHOUT: 'test:development'
SHOPIFY_FLAG_CLIENT_ID: ${{ secrets.SHOPIFY_FLAG_CLIENT_ID }}
SHOPIFY_CLI_PARTNERS_TOKEN: ${{ secrets.SHOPIFY_CLI_PARTNERS_TOKEN }}
jobs:
main:
name: '[Main] Node ${{ matrix.node }} in ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
node: ['18.12.0', '20.2.0']
steps:
- uses: actions/checkout@v3
name: Checkout [${{ github.ref_name }}]
with:
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ matrix.node }}
- name: Build
run: pnpm nx run-many --all --skip-nx-cache --target=build
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '18.12.0' }}
- name: Lint
run: pnpm nx run-many --all --skip-nx-cache --target=lint
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '18.12.0' }}
- name: Type-check
run: pnpm nx run-many --all --skip-nx-cache --target=type-check
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '18.12.0' }}
- name: Bundle
run: pnpm nx run-many --all --skip-nx-cache --target=bundle
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '18.12.0' }}
- name: Unit tests
run: pnpm nx run-many --all --skip-nx-cache --target=test --exclude=features
- name: Acceptance tests
if: ${{ matrix.node == '18.12.0' }}
run: pnpm nx run features:test
- name: Send Slack notification on failure
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # pin@v1.23.0
if: failure()
with:
payload: |
{
"build_url": "https://github.com/Shopify/cli/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Run and save test coverage
uses: ./.github/actions/run-and-save-test-coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '18.12.0' }}
with:
branch-name: ${{ github.ref_name }}
pr-platform-agnostic:
name: '[PR] Run ${{ matrix.target }} with Node ${{ matrix.node }} in ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-latest']
node: ['18.12.0']
target: ['build', 'type-check', 'lint']
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ matrix.node }}
- name: ${{ matrix.target }}
run: pnpm nx run-many --all --skip-nx-cache --target=${{ matrix.target }}
pr-platform-agnostic-bundle:
name: '[PR] Run bundle with Node ${{ matrix.node }} in ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-latest']
node: ['18.12.0']
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ matrix.node }}
- name: 'Build'
run: pnpm nx run-many --all --skip-nx-cache --target=build
- name: 'Bundle'
run: pnpm nx run-many --all --skip-nx-cache --target=bundle
pr-platform-agnostic-knip:
name: '[PR] Run knip with Node ${{ matrix.node }} in ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'pull_request' }}
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-latest']
node: ['18.12.0']
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ matrix.node }}
- name: Post the knip results
uses: codex-/knip-reporter@1ccefdf649b847793412fbfba286dc0b05defc1e # pin@v2
with:
verbose: true
oclif-checks:
name: '[PR] Check OCLIF manifests & readme & docs'
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: 18.12.0
- name: Build
run: pnpm build
- name: Refresh manifests
run: pnpm refresh-manifests
- name: Check if there are changes
run: 'test -z "$(git status --porcelain "**/oclif.manifest.json" )" || { echo -e "Run pnpm refresh-manifests before pushing new commands or flags. Diff here:\n\n$(git diff)" ; exit 1; }'
- name: Refresh readme
run: pnpm refresh-readme
- name: Check if there are changes
run: 'test -z "$(git status --porcelain "packages/cli/README.md" )" || { echo -e "Run pnpm refresh-readme before pushing new commands or flags. Diff here:\n\n$(git diff)" ; exit 1; }'
- name: Refresh documentation
run: pnpm refresh-documentation
- name: Check if there are changes
run: 'test -z "$(git status --porcelain)" || { echo -e "Run pnpm refresh-documentation when you update functions with autogenerated examples. Diff here:\n\n$(git diff)" ; exit 1; }'
- name: Build shopify.dev docs
run: pnpm shopify docs generate && pnpm build-docs
- name: Check if there are changes
run: 'test -z "$(git status --porcelain "docs-shopify.dev/generated/*.json" )" || { echo -e "Run (pnpm shopify docs generate && pnpm build-docs) before pushing new commands or flags." ; exit 1; }'
pr-platform-dependent:
name: '[PR] Test with Node ${{ matrix.node }} in ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
node: ['18.12.0', '20.2.0']
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ matrix.node }}
- name: Unit tests
run: pnpm test:unit
pr-acceptance-tests:
name: '[PR] Accept. Test with Node ${{ matrix.node }} in ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
node: ['18.12.0']
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ matrix.node }}
- name: Acceptance tests
run: pnpm test:features
pr-test-coverage:
name: '[PR] Run Test Coverage with Node ${{ matrix.node }} in ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && github.event.pull_request.user.login != 'dependabot[bot]' }}
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-latest']
node: ['18.12.0']
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ matrix.node }}
- name: Build
run: pnpm nx run-many --all --skip-nx-cache --target=build
- name: Run and save test coverage
uses: ./.github/actions/run-and-save-test-coverage
with:
branch-name: '${{ github.head_ref }}'
- name: Download and publish test coverage
uses: ./.github/actions/download-and-publish-test-coverage
with:
base-branch-name: '${{ github.base_ref }}'
manually-triggered:
name: '[Manual] Test with Node ${{ inputs.node-version }} in ${{ inputs.os }}'
runs-on: ${{ inputs.os }}
if: ${{ github.event_name == 'workflow_dispatch' }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch-name }}
fetch-depth: 1
- name: Setup deps
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ inputs.node-version }}
- name: Unit tests
run: pnpm test:unit
- name: Acceptance tests
run: pnpm test:features
- name: Setup tmate session
if: ${{ failure() && inputs.debug-enabled }}
uses: mxschmitt/action-tmate@1005f9c9db5f1b055a495e72c6e589764984baf6 # pin@v3
with:
limit-access-to-actor: true