Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,11 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Run lint
shell: bash
run: |
alias pnpm="$SFW_BIN pnpm"
pnpm --filter @socketsecurity/cli run check

type-check:
Expand Down Expand Up @@ -187,12 +186,11 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Run type check
shell: bash
run: |
alias pnpm="$SFW_BIN pnpm"
pnpm --filter @socketsecurity/cli run type

# Sharded unit tests for faster CI.
Expand Down Expand Up @@ -262,13 +260,12 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Build CLI
working-directory: packages/cli
shell: bash
run: |
alias pnpm="$SFW_BIN pnpm"
pnpm run build

- name: Run unit tests (shard ${{ matrix.shard }})
Expand All @@ -277,7 +274,6 @@ jobs:
env:
SHARD: ${{ matrix.shard }}
run: |
alias pnpm="$SFW_BIN pnpm"
pnpm test:unit --shard="$SHARD"/3

# E2E tests
Expand Down Expand Up @@ -347,13 +343,12 @@ jobs:
export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init }
CODE

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Build CLI
working-directory: packages/cli
shell: bash
run: |
alias pnpm="$SFW_BIN pnpm"
pnpm run build

- name: Run e2e tests (shard ${{ matrix.shard }})
Expand All @@ -363,5 +358,4 @@ jobs:
SOCKET_CLI_API_TOKEN: ${{ secrets.SOCKET_CLI_API_TOKEN }}
SHARD: ${{ matrix.shard }}
run: |
alias pnpm="$SFW_BIN pnpm"
pnpm run e2e-tests --shard="$SHARD"/2
9 changes: 3 additions & 6 deletions .github/workflows/provenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ jobs:

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Build CLI
shell: bash
run: |
alias pnpm="$SFW_BIN pnpm"
pnpm --filter @socketsecurity/cli run build

- name: Generate platform matrix
Expand Down Expand Up @@ -107,7 +106,7 @@ jobs:

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Download CLI bundle
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand All @@ -122,7 +121,6 @@ jobs:
MATRIX_PLATFORM: ${{ matrix.platform }}
MATRIX_ARCH: ${{ matrix.arch }}
run: |
alias pnpm="$SFW_BIN pnpm"
LIBC_FLAG=""
if [ "$MATRIX_LIBC" = "musl" ]; then
LIBC_FLAG="--libc=musl"
Expand Down Expand Up @@ -164,7 +162,7 @@ jobs:

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

# Get versions for lock-stepped and independent packages.
- name: Get versions
Expand Down Expand Up @@ -264,7 +262,6 @@ jobs:
- name: Build CLI
shell: bash
run: |
alias pnpm="$SFW_BIN pnpm"
INLINED_PUBLISHED_BUILD=1 pnpm run build

- name: Publish @socketsecurity/cli
Expand Down
30 changes: 4 additions & 26 deletions .github/workflows/weekly-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ jobs:
node-version-file: .node-version
cache: 'pnpm'

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Check for npm updates
id: check
shell: bash
run: |
alias pnpm="$SFW_BIN pnpm"
echo "Checking for npm package updates..."
HAS_UPDATES=false
NPM_UPDATES=$(pnpm outdated 2>/dev/null || true)
Expand Down Expand Up @@ -78,7 +77,7 @@ jobs:
node-version-file: .node-version
cache: 'pnpm'

- uses: SocketDev/socket-registry/.github/actions/install@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main

- name: Create update branch
id: branch
Expand All @@ -90,7 +89,7 @@ jobs:
git checkout -b "$BRANCH_NAME"
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT

- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
with:
gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}

Expand All @@ -101,13 +100,6 @@ jobs:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_ACTIONS: 'true'
run: |
if [ -n "$SFW_BIN" ]; then
mkdir -p /tmp/sfw-bin
printf '#!/bin/bash\nexec "%s" pnpm "$@"\n' "$SFW_BIN" > /tmp/sfw-bin/pnpm
chmod +x /tmp/sfw-bin/pnpm
export PATH="/tmp/sfw-bin:$PATH"
fi

if [ -z "$ANTHROPIC_API_KEY" ]; then
echo "ANTHROPIC_API_KEY not set - skipping automated update"
echo "success=false" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -155,13 +147,6 @@ jobs:
id: tests
if: steps.update.outputs.success == 'true'
run: |
if [ -n "$SFW_BIN" ]; then
mkdir -p /tmp/sfw-bin
printf '#!/bin/bash\nexec "%s" pnpm "$@"\n' "$SFW_BIN" > /tmp/sfw-bin/pnpm
chmod +x /tmp/sfw-bin/pnpm
export PATH="/tmp/sfw-bin:$PATH"
fi

set +e
pnpm build 2>&1 | tee build.log
BUILD_EXIT=${PIPESTATUS[0]}
Expand All @@ -184,13 +169,6 @@ jobs:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_ACTIONS: 'true'
run: |
if [ -n "$SFW_BIN" ]; then
mkdir -p /tmp/sfw-bin
printf '#!/bin/bash\nexec "%s" pnpm "$@"\n' "$SFW_BIN" > /tmp/sfw-bin/pnpm
chmod +x /tmp/sfw-bin/pnpm
export PATH="/tmp/sfw-bin:$PATH"
fi

FAILURE_LOG="$(cat build.log test.log 2>/dev/null)"

set +e
Expand Down Expand Up @@ -338,7 +316,7 @@ jobs:
test.log
retention-days: 7

- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@da519693b701861bc0f9690a30f50af1a1dcd49c # main
- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
if: always()

notify:
Expand Down