Skip to content
Closed
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
49 changes: 49 additions & 0 deletions .github/workflows/sg-ci-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: SG CI - Node
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
run: |
corepack enable || true
if [ -f yarn.lock ]; then yarn install --frozen-lockfile || yarn install || true;
elif [ -f pnpm-lock.yaml ]; then pnpm install --frozen-lockfile || pnpm install || true;
elif [ -f package-lock.json ]; then npm ci || npm install || true;
elif [ -f package.json ]; then npm install || true;
else echo "no manifest"; fi
- name: Typecheck
run: |
if [ -f tsconfig.json ]; then npx --yes -p typescript tsc -p tsconfig.json --noEmit;
else
# These are concatenated CodeSearchNet corpus files, not a coherent
# program, so duplicate declarations across samples are expected.
# Run a best-effort syntax scan without failing the job.
for f in $(git ls-files '*.js' '*.jsx' | head -n 300); do node --check "$f" || true; done;
fi
code-intel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install scip-typescript and src-cli
run: |
npm install -g @sourcegraph/scip-typescript
curl -sfL https://demo.sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/src
chmod +x /usr/local/bin/src
- name: Index and upload
env:
SRC_ENDPOINT: https://demo.sourcegraph.com
SRC_ACCESS_TOKEN: ${{secrets.SRC_ACCESS_TOKEN}}
run: |
npm install || true
scip-typescript index --infer-tsconfig --no-progress || scip-typescript index || true
if [ -f index.scip ]; then src code-intel upload -no-progress; else echo "no index produced"; fi
Loading