forked from green-code-initiative/creedengo-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.5 KB
/
build.yml
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
name: Build
on:
push:
branches: [ main ]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
test:
name: Lint and Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x, 20.x ]
java-version: [ 11 ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Use JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Install dependencies
run: yarn install --immutable
working-directory: eslint-plugin
- name: Lint eslint-plugin
run: yarn lint
working-directory: eslint-plugin
- name: Test eslint-plugin
run: yarn test:cov
working-directory: eslint-plugin
- name: Verify SonarQube plugin
run: mvn -e -B verify
working-directory: sonar-plugin
- name: SonarQube Scan
uses: sonarsource/[email protected] # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}