forked from hyperledger/fabric-samples
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (58 loc) · 1.9 KB
/
lint.yaml
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
#
# SPDX-License-Identifier: Apache-2.0
#
name: Lint 🎉
run-name: ${{ github.actor }} is linting fabric-samples 🎉
on:
workflow_dispatch:
push:
branches: [ "main", "release-2.5" ]
pull_request:
branches: [ "main", "release-2.5" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GO_VER: '1.22'
NODE_VER: 18.x
JAVA_VER: 11.x
jobs:
go:
runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VER }}
- uses: actions/checkout@v4
- run: go install golang.org/x/tools/cmd/goimports@latest
- run: ci/scripts/lint-go.sh
typescript:
runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
- run: ci/scripts/lint-typescript.sh
javascript:
runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
- run: ci/scripts/lint-javascript.sh
java:
runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VER }}
- run: ci/scripts/lint-java.sh
shell:
runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- uses: actions/checkout@v4
- run: ci/scripts/lint-shell.sh