Repository navigation
74 lines (70 loc) · 2.5 KB
/
Copy pathci.yml
File metadata and controls
74 lines (70 loc) · 2.5 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
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
test:
# Linux runs the full suite and packaging; Windows runs the tests once,
# for its paths, file URIs and the read-only extracted JDK copies.
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check formatting
if: runner.os == 'Linux'
run: test -z "$(gofmt -l .)" || { gofmt -l .; exit 1; }
- name: Vet
run: go vet ./...
- name: Test
run: go test -timeout=120s -race -count=1 ./...
package:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x64
- os: ubuntu-24.04-arm
arch: arm64
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Check manifest and build the archives
run: node scripts/package.mjs
- name: Verify Linux release archives
run: node --test --test-timeout=60000 scripts/package/*.test.mjs
- name: Start the packaged Linux language server
run: node scripts/package/smoke-linux.mjs dist/*-linux-${{ matrix.arch }}.zip
- name: Validate against Lithe Store rules
run: |
git clone --depth 1 https://github.com/Lithe-IDEA/Lithe-store "$RUNNER_TEMP/store"
node --input-type=module -e "
import { readPackageManifests, checkManifest } from '$RUNNER_TEMP/store/scripts/validate-index.mjs';
import { readdirSync, readFileSync } from 'node:fs';
const manifest = JSON.parse(readFileSync('io.github.lithe-idea.java-navigation/plugin.json', 'utf8'));
const entry = { id: manifest.id };
let failed = false;
for (const name of readdirSync('dist')) {
const { manifests, unsafe } = readPackageManifests('dist/' + name, entry.id);
const problems = [...unsafe, ...checkManifest(manifests, entry, manifest)];
for (const problem of problems) { console.error(name + ': ' + problem); failed = true; }
}
process.exit(failed ? 1 : 0);
"