Skip to content

Test diffctx 3

Test diffctx 3 #228

Workflow file for this run

name: SmokeTest
on:
push:
branches: '*'
pull_request:
branches: '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# at least support HEAD~1 for testing
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
# smoke test
- name: Create index file
run: |
curl -L https://github.com/sourcegraph/lsif-go/releases/download/v1.9.3/src_linux_amd64 -o /usr/local/bin/lsif-go
chmod +x /usr/local/bin/lsif-go
lsif-go -v
- name: Test
run: go test -v ./... -coverprofile=coverage.txt -coverpkg=./...
- name: Cmd Test
run: |
make
./srctx diff --outputHtml output.html --outputJson output.json
cat ./output.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
# smoke test done, start heavy test
- name: Set up Node.js
uses: actions/setup-node@v3
- name: Build Extra Dep (scip-java)
run: |
# scip-java
curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" | gzip -d > coursier \
&& chmod +x coursier \
&& ./coursier setup -y \
&& ./coursier bootstrap --standalone --bat=true -o scip-java com.sourcegraph:scip-java_2.13:0.8.18 --main com.sourcegraph.scip_java.ScipJava
- name: Build Extra Dep (lsif-node)
run: |
# lsif-node
npm install -g lsif
lsif -v
- name: Build Extra Dep (scip-python)
run: |
npm install -g @sourcegraph/scip-python
scip-python -V
- name: Third Party Test (Golang)
run: |
git clone https://github.com/gin-gonic/gin --depth=6
cd gin
lsif-go -v
../srctx diff --before HEAD~5 --outputHtml ../golang.html --outputJson ../golang.json
cd ..
cat ./golang.json
- name: Third Party Test (Java)
run: |
git clone https://github.com/junit-team/junit4 --depth=6
cd junit4
../scip-java index -- package -DskipTests --batch-mode --errors --settings .github/workflows/settings.xml
../srctx diff --before HEAD~5 --scip ./index.scip --outputHtml ../java.html --outputJson ../java.json
cd ..
cat ./java.json
- name: Third Party Test (Kotlin)
run: |
git clone https://github.com/square/kotlinpoet --depth=6
cd kotlinpoet
../scip-java index -- clean build
../srctx diff --before HEAD~5 --scip ./index.scip --outputHtml ../kotlin.html --outputJson ../kotlin.json
cd ..
cat ./kotlin.json
- name: Thrid Party Test (Node)
run: |
git clone https://github.com/microsoft/lsif-node.git --depth=6
cd lsif-node
lsif tsc -p ./tsconfig.json --package ./package.json --noContents --out ./dump.lsif
../srctx diff --before HEAD~5 --lsif ./dump.lsif --outputHtml ../node.html --outputJson ../node.json
cd ..
cat ./node.json
- name: Thrid Party Test (Python)
run: |
git clone https://github.com/psf/requests.git --depth=6
cd requests
scip-python index . --project-name requests
../srctx diff --before HEAD~5 --scip ./index.scip --outputHtml ../python.html --outputJson ../python.json
cd ..
cat ./python.json
- name: diffctx
uses: williamfzc/[email protected]
with:
lang: "golang"
# for creating comments
permissions:
pull-requests: write