Skip to content

Commit 74324e5

Browse files
committed
GLSP-1578: Switch to Github actions
Part of /issues/1578
1 parent 13b23ed commit 74324e5

File tree

8 files changed

+139
-180
lines changed

8 files changed

+139
-180
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
concurrency:
4+
group: ci-${{ github.ref }}
5+
cancel-in-progress: true
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches: [master]
10+
pull_request:
11+
branches: [master]
12+
13+
jobs:
14+
build:
15+
name: Build
16+
timeout-minutes: 60
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
21+
with:
22+
node-version: 20.x
23+
- name: Build
24+
run: yarn install
25+
- name: Check for uncommitted changes in yarn.lock
26+
run: |
27+
if git diff --name-only | grep -q "^yarn.lock"; then
28+
echo "::error::The yarn.lock file has uncommitted changes!"
29+
exit 1
30+
fi
31+
lint:
32+
name: Lint
33+
timeout-minutes: 60
34+
runs-on: ubuntu-22.04
35+
steps:
36+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
38+
with:
39+
node-version: 20.x
40+
- name: Install
41+
run: |
42+
yarn install
43+
- name: Create eslint json report
44+
run: |
45+
yarn lint:ci
46+
- name: Create summary
47+
if: always()
48+
run: |
49+
npm_config_yes=true npx github:10up/eslint-json-to-md#82ff16b --path ./eslint_report.json --output ./eslint_report.md
50+
cat eslint_report.md >> $GITHUB_STEP_SUMMARY

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ defaults:
1414
run:
1515
working-directory: ./config
1616
on:
17-
push:
18-
branches: [master]
19-
pull_request:
20-
# The branches below must be a subset of the branches above
21-
branches: [master]
17+
workflow_dispatch:
2218
schedule:
23-
- cron: '28 9 * * 3'
19+
- cron: '28 9 * * 3' # Weekly on Wednesdays at 09:28 UTC
2420

2521
jobs:
2622
analyze:
@@ -41,11 +37,11 @@ jobs:
4137

4238
steps:
4339
- name: Checkout repository
44-
uses: actions/checkout@v2
40+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4541

4642
# Initializes the CodeQL tools for scanning.
4743
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@v2
44+
uses: github/codeql-action/init@16df4fbc19aea13d921737861d6c622bf3cefe23 # v2.23.0
4945
with:
5046
languages: ${{ matrix.language }}
5147
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +52,7 @@ jobs:
5652
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5753
# If this step fails, then you should remove it and run the build manually (see below)
5854
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
55+
uses: github/codeql-action/autobuild@16df4fbc19aea13d921737861d6c622bf3cefe23 # v2.23.0
6056

6157
# ℹ️ Command-line programs to run using the OS shell.
6258
# 📚 https://git.io/JvXDl
@@ -70,4 +66,4 @@ jobs:
7066
# make release
7167

7268
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/analyze@v2
69+
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 # v2.23.0

.github/workflows/publish-next.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: 'Publish next'
2+
on:
3+
workflow_run:
4+
workflows: ['CI']
5+
types:
6+
- completed
7+
branches: [master]
8+
workflow_dispatch:
9+
10+
permissions:
11+
id-token: write
12+
jobs:
13+
build:
14+
name: Build & Release
15+
runs-on: ubuntu-22.04
16+
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success')
17+
env:
18+
changes: true
19+
steps:
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+
with:
22+
# To fetch all history for all branches and tags.
23+
# Required for lerna to determine the version of the next package.
24+
fetch-depth: 0
25+
ref: ${{ github.event.workflow_run.head_commit.id || github.sha }}
26+
- name: Check for changes in "dev-packages" directory
27+
id: check_changes
28+
run: |
29+
if git diff --name-only HEAD^ HEAD | grep -qE '^dev-packages'; then
30+
echo "changes=true" >> $GITHUB_ENV
31+
else
32+
echo "changes=false" >> $GITHUB_ENV
33+
fi
34+
if: github.event_name == 'workflow_run'
35+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
36+
with:
37+
node-version: 20.x
38+
registry-url: 'https://registry.npmjs.org'
39+
if: env.changes == 'true'
40+
- name: Build
41+
run: yarn
42+
if: env.changes == 'true'
43+
- name: Publish NPM
44+
run: yarn publish:next
45+
env:
46+
NPM_CONFIG_PROVENANCE: 'true'
47+
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
48+
if: env.changes == 'true'

Jenkinsfile

Lines changed: 0 additions & 146 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Eclipse GLSP
22

3-
[![Client Status](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-client/job/master/badge/icon?subject=client)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-client/job/master/)
3+
[![Client Status](https://img.shields.io/github/actions/workflow/status/eclipse-glsp/glsp-client/ci.yml?branch=master&label=Client)](https://github.com/eclipse-glsp/glsp-client/actions/workflows/ci.yml)
44
[![ServerJava Status](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-server/job/master/badge/icon?subject=server-java)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-server/job/master/)
5-
[![ServerNode Status](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-server-node/job/main/badge/icon?subject=server-node)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-server-node/job/main/)
6-
[![Dev Status](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp/job/master/badge/icon?subject=dev-packages)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp/job/master/)
5+
[![ServerNode Status](https://img.shields.io/github/actions/workflow/status/eclipse-glsp/glsp-server-node/ci.yml?branch=main&label=server-node)](https://github.com/eclipse-glsp/glsp-server-node/actions/workflows/ci.yml)
6+
[![Dev Status](https://img.shields.io/github/actions/workflow/status/eclipse-glsp/glsp/ci.yml?branch=master&label=dev-packages)](https://github.com/eclipse-glsp/glsp/actions/workflows/ci.yml)
77
[![Theia Status](https://img.shields.io/github/actions/workflow/status/eclipse-glsp/glsp-theia-integration/ci.yml?branch=master&label=theia%20integration)](https://github.com/eclipse-glsp/glsp-theia-integration/actions/workflows/ci.yml)
8-
[![Vscode Status](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-vscode-integration/job/master/badge/icon?subject=vscode-integration)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-vscode-integration/job/master/)
8+
[![Vscode Status](https://img.shields.io/github/actions/workflow/status/eclipse-glsp/glsp-vscode-integration/ci.yml?branch=master&label=vscode%20integration)](https://github.com/eclipse-glsp/glsp-vscode-integration/actions/workflows/ci.yml)
99
[![Eclipse Status](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-eclipse-integration/job/master/badge/icon?subject=eclipse-integration)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-eclipse-integration/job/master/)
1010
[![Playwright Status](https://img.shields.io/github/actions/workflow/status/eclipse-glsp/glsp-playwright/ci.yml?branch=main&label=playwright)](https://github.com/eclipse-glsp/glsp-playwright/actions/workflows/ci.yml)
1111
[![Examples Status](https://img.shields.io/github/actions/workflow/status/eclipse-glsp/glsp-examples/ci.yml?branch=master&label=examples)](https://github.com/eclipse-glsp/glsp-examples/actions/workflows/ci.yml)

dev-packages/config-test/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"chai": "^4.3.10",
3535
"ignore-styles": "^5.0.1",
3636
"mocha": "^10.2.0",
37-
"mocha-jenkins-reporter": "^0.4.8",
3837
"nyc": "^15.1.0",
3938
"reflect-metadata": "^0.1.13",
4039
"sinon": "^15.1.0",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"format:check": "prettier --check .",
1616
"glsp": "node dev-packages/cli/dist/cli.js",
1717
"lint": "eslint --ext .ts,.tsx .",
18-
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
18+
"lint:ci": "yarn lint --output-file eslint_report.json --format json",
1919
"lint:fix": "yarn lint --fix",
2020
"prepare": "yarn run build",
2121
"publish:next": "lerna publish preminor --exact --canary --preid next --dist-tag next --no-git-tag-version --no-push --ignore-scripts --yes",
@@ -40,7 +40,7 @@
4040
"ignore-styles": "^5.0.1",
4141
"lerna": "^6.6.2",
4242
"mocha": "^10.2.0",
43-
"mocha-jenkins-reporter": "^0.4.8",
43+
"mocha-ctrf-json-reporter": "^0.0.9",
4444
"nyc": "^15.1.0",
4545
"prettier": "^2.8.8",
4646
"reflect-metadata": "^0.1.13",

0 commit comments

Comments
 (0)