Skip to content

Commit 30fb5a7

Browse files
Merge pull request #6600 from Shopify/clean-up-workflows
Clean up CI workflows
2 parents cfbef78 + 0eca8eb commit 30fb5a7

File tree

4 files changed

+211
-240
lines changed

4 files changed

+211
-240
lines changed

.github/workflows/checks.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/cli-main.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Main tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- stable/3.*
8+
paths-ignore:
9+
- '**.md'
10+
- 'docs/**'
11+
- 'RELEASE_NOTES/**'
12+
13+
concurrency:
14+
group: shopify-cli-main-${{ github.run_id }}
15+
cancel-in-progress: true
16+
17+
env:
18+
DEBUG: '1'
19+
SHOPIFY_CLI_ENV: development
20+
SHOPIFY_CONFIG: debug
21+
PNPM_VERSION: '10.11.1'
22+
BUNDLE_WITHOUT: 'test:development'
23+
SHOPIFY_FLAG_CLIENT_ID: ${{ secrets.SHOPIFY_FLAG_CLIENT_ID }}
24+
GH_TOKEN: ${{ secrets.SHOPIFY_GH_READ_CONTENT_TOKEN }}
25+
GH_TOKEN_SHOP: ${{ secrets.SHOP_GH_READ_CONTENT_TOKEN }}
26+
DEFAULT_NODE_VERSION: '24.1.0'
27+
28+
jobs:
29+
main:
30+
name: '[Main] Node ${{ matrix.node }} in ${{ matrix.os }}'
31+
runs-on: ${{ matrix.os }}
32+
timeout-minutes: 30
33+
strategy:
34+
matrix:
35+
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
36+
node: [ '20.14.0', '22.2.0', '24.1.0' ]
37+
steps:
38+
- uses: actions/checkout@v3
39+
name: Checkout [${{ github.ref_name }}]
40+
with:
41+
fetch-depth: 1
42+
- name: Setup deps
43+
uses: ./.github/actions/setup-cli-deps
44+
with:
45+
node-version: ${{ matrix.node }}
46+
- name: Build
47+
run: pnpm nx run-many --all --skip-nx-cache --target=build --output-style=stream
48+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '24.1.0' }}
49+
- name: Lint
50+
run: pnpm nx run-many --all --skip-nx-cache --target=lint --output-style=stream
51+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '24.1.0' }}
52+
- name: Type-check
53+
run: pnpm nx run-many --all --skip-nx-cache --target=type-check --output-style=stream
54+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '24.1.0' }}
55+
- name: Bundle
56+
run: pnpm nx run-many --all --skip-nx-cache --target=bundle --output-style=stream
57+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '24.1.0' }}
58+
- name: Unit tests
59+
run: pnpm vitest run
60+
env:
61+
VITEST_MIN_THREADS: "1"
62+
VITEST_MAX_THREADS: "4"
63+
- name: Acceptance tests
64+
if: ${{ matrix.node == '24.1.0' }}
65+
env:
66+
SHOPIFY_CLI_PARTNERS_TOKEN: ${{ secrets.SHOPIFY_CLI_PARTNERS_TOKEN }}
67+
run: pnpm nx run features:test
68+
- name: Send Slack notification on failure
69+
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # [email protected]
70+
if: ${{ failure() && !cancelled() }}
71+
with:
72+
payload: |
73+
{
74+
"build_url": "https://github.com/Shopify/cli/actions/runs/${{ github.run_id }}"
75+
}
76+
env:
77+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
78+
- name: Run and save test coverage
79+
uses: ./.github/actions/run-and-save-test-coverage
80+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '24.1.0' }}
81+
with:
82+
branch-name: ${{ github.ref_name }}

.github/workflows/cli-manual.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Manual tests
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch-name:
7+
type: string
8+
description: 'Branch'
9+
required: true
10+
default: 'main'
11+
node-version:
12+
description: 'Node version'
13+
required: true
14+
default: '24.1.0'
15+
type: choice
16+
options:
17+
- 20.14.0
18+
- 22.2.0
19+
- 24.1.0
20+
os:
21+
description: 'Operating system'
22+
required: true
23+
default: 'ubuntu-latest'
24+
type: choice
25+
options:
26+
- ubuntu-latest
27+
- windows-latest
28+
- macos-latest
29+
debug-enabled:
30+
type: boolean
31+
description: 'Enable tmate debugging'
32+
required: true
33+
default: true
34+
35+
env:
36+
DEBUG: '1'
37+
SHOPIFY_CLI_ENV: development
38+
SHOPIFY_CONFIG: debug
39+
PNPM_VERSION: '10.11.1'
40+
BUNDLE_WITHOUT: 'test:development'
41+
SHOPIFY_FLAG_CLIENT_ID: ${{ secrets.SHOPIFY_FLAG_CLIENT_ID }}
42+
GH_TOKEN: ${{ secrets.SHOPIFY_GH_READ_CONTENT_TOKEN }}
43+
GH_TOKEN_SHOP: ${{ secrets.SHOP_GH_READ_CONTENT_TOKEN }}
44+
DEFAULT_NODE_VERSION: '24.1.0'
45+
DEFAULT_OS: 'ubuntu-latest'
46+
47+
jobs:
48+
manually-triggered:
49+
name: '[Manual] Test with Node ${{ inputs.node-version }} in ${{ inputs.os }}'
50+
runs-on: ${{ inputs.os }}
51+
timeout-minutes: 60
52+
steps:
53+
- uses: actions/checkout@v3
54+
with:
55+
ref: ${{ inputs.branch-name }}
56+
fetch-depth: 1
57+
- name: Setup deps
58+
uses: ./.github/actions/setup-cli-deps
59+
with:
60+
node-version: ${{ inputs.node-version }}
61+
- name: Unit tests
62+
run: pnpm test:unit --output-style=stream
63+
- name: Acceptance tests
64+
env:
65+
SHOPIFY_CLI_PARTNERS_TOKEN: ${{ secrets.SHOPIFY_CLI_PARTNERS_TOKEN }}
66+
run: pnpm test:features --output-style=stream
67+
- name: Setup tmate session
68+
if: ${{ failure() && inputs.debug-enabled }}
69+
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 # pin@v3
70+
with:
71+
limit-access-to-actor: true

0 commit comments

Comments
 (0)