Skip to content

Commit 2dbadf5

Browse files
committed
chore(ci): cleanup CI to use setup-java and bump deps
This aligns CI a bit better with how it's being done in scip-java. It also ensures actions/checkout is up to date and that the sourcegraph upload is the newly recommended way of using the yarn installed `src`. Supercedes sourcegraph#36 Relates to some CI changes in sourcegraph#51 Supercedes sourcegraph#56
1 parent 860f088 commit 2dbadf5

4 files changed

Lines changed: 37 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ jobs:
88
test:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: olafurpg/setup-scala@v13
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-java@v3
13+
with:
14+
distribution: "temurin"
15+
cache: "sbt"
16+
java-version: 8
1317
- run: sbt scripted +test
1418
check:
1519
runs-on: ubuntu-latest
1620
steps:
17-
- uses: actions/checkout@v2
18-
- uses: olafurpg/setup-scala@v13
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-java@v3
23+
with:
24+
distribution: "temurin"
25+
cache: "sbt"
26+
java-version: 8
1927
- run: sbt checkAll

.github/workflows/pr-auditor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
check-pr:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with: { repository: 'sourcegraph/sourcegraph' }
1313
- uses: actions/setup-go@v2
1414
with: { go-version: '1.18' }

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ jobs:
77
publish:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: olafurpg/setup-scala@v13
12-
- uses: olafurpg/setup-gpg@v3
13-
- run: git fetch --unshallow
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
- uses: actions/setup-java@v3
14+
with:
15+
distribution: 'temurin'
16+
java-version: 8
17+
cache: 'sbt'
1418
- name: Publish ${{ github.ref }}
1519
run: sbt ci-release
1620
env:

.github/workflows/sourcegraph.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@ on:
44
branches:
55
- main
66
pull_request:
7+
78
jobs:
8-
lsif:
9+
scip:
910
runs-on: ubuntu-latest
10-
name: "Upload LSIF"
11+
name: "Upload SCIP"
1112
steps:
12-
- uses: actions/checkout@v2
13-
- uses: coursier/setup-action@v1.1.2
13+
- uses: actions/checkout@v3
14+
- uses: coursier/setup-action@v1
1415
with:
15-
jvm: adopt:8
16-
- run: |
17-
cs launch com.sourcegraph:scip-java_2.13:latest.stable -M com.sourcegraph.scip_java.ScipJava -- index
18-
- run: yarn global add @sourcegraph/src
19-
- run: |
20-
src code-intel upload "-commit=${GITHUB_SHA}" "-github-token=${GITHUB_TOKEN}"
16+
jvm: 'temurin:8'
17+
apps: scip-java
18+
19+
- name: Generate SCIP File
20+
run: scip-java index
21+
22+
- name: Install src
23+
run: yarn global add @sourcegraph/src
24+
25+
- name: Upload SCIP file
26+
run: src code-intel upload -github-token $GITHUB_TOKEN
2127
env:
2228
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)