Repository navigation
82 lines (69 loc) · 2.26 KB
/
Copy pathci.yaml
File metadata and controls
82 lines (69 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
format:
runs-on: ubuntu-latest
name: Formatting
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 25.0.5+100000002.0.LTS
- uses: gradle/actions/setup-gradle@v6
with:
gradle-version: 9.9.2
- run: gradle spotlessCheck --no-daemon
kotlin_indexer:
runs-on: ubuntu-latest
name: scip-kotlin-analysis
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 25.0.5+100000002.0.LTS
- uses: gradle/actions/setup-gradle@v6
with:
gradle-version: 9.9.2
- name: scip-kotlin-analysis tests
run: gradle :scip-kotlin-analysis:test --no-daemon
- name: scip-kotlin-analysis consumer smoke test
run: |
gradle --no-daemon :scip-shared:publishToMavenLocal :scip-kotlin-analysis:publishToMavenLocal
gradle --no-daemon -p examples/kotlin-analysis-consumer run
docker_test:
runs-on: ubuntu-latest
name: Docker CLI tests
steps:
- uses: actions/checkout@v7
- name: Build Dockerised CLI
run: docker build -t ghcr.io/scip-code/scip-java:latest .
- name: Test Maven and Gradle fixtures
shell: bash
run: |
set -euo pipefail
for fixture in maven/basic gradle/kotlin2; do
repo_dir="$(mktemp -d "$RUNNER_TEMP/scip-java-docker.XXXXXX")"
cp -R "scip-java/src/test/resources/fixtures/$fixture/." "$repo_dir/"
echo "Indexing $fixture"
# Match the Kotlin fixture's JDK 17 toolchain without relying on fallback.
docker run --rm --env JVM_VERSION=17 \
--mount "type=bind,source=$repo_dir,target=/sources" \
-w /sources ghcr.io/scip-code/scip-java:latest scip-java index
test -s "$repo_dir/index.scip"
done
ci-pass:
if: always()
needs: [format, kotlin_indexer, docker_test]
runs-on: ubuntu-latest
name: CI pass
steps:
- if: >-
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
run: exit 1