-
Notifications
You must be signed in to change notification settings - Fork 418
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ci): move cli test to separate workflow without sharding (#5292)
* test(ci): move cli test to separate workflow without sharding * test(cli): re-enable cli tests
- Loading branch information
Showing
2 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: CLI Unit tests | ||
|
||
on: | ||
# Build on pushes branches that have a PR (including drafts) | ||
pull_request: | ||
# Build on commits pushed to branches without a PR if it's in the allowlist | ||
push: | ||
branches: [next] | ||
|
||
jobs: | ||
cli-test: | ||
timeout-minutes: 60 | ||
name: CLI Tests (${{ matrix.os }} / node ${{ matrix.node }}) | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18, 20] | ||
experimental: [false] | ||
# include: | ||
# - os: windows-latest | ||
# node: 16 | ||
# experimental: true | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Cache node modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-modules-${{ env.cache-name }}- | ||
${{ runner.os }}-modules- | ||
${{ runner.os }}- | ||
- name: Install project dependencies | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build CLI | ||
run: yarn build:cli # Needed for CLI tests | ||
|
||
- name: Test | ||
id: test | ||
run: | | ||
node -v | ||
npm -v | ||
yarn test --silent --selectProjects=@sanity/cli | ||
env: | ||
SANITY_CI_CLI_AUTH_TOKEN: ${{ secrets.SANITY_CI_CLI_AUTH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91d2481
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
performance-studio – ./
performance-studio.sanity.build
performance-studio-git-next.sanity.build
91d2481
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
test-studio – ./
test-studio.sanity.build
test-studio-git-next.sanity.build