Skip to content

Commit

Permalink
Update build GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
utarwyn committed Jul 3, 2023
1 parent c769537 commit 6c7fdf3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 42 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,39 @@ jobs:
strategy:
matrix:
node-version: [ 16.x, 18.x ]
java-version: [ 11 ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
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
- name: Lint
working-directory: eslint-plugin
- name: Lint eslint-plugin
run: yarn lint
- name: Test
working-directory: eslint-plugin
- name: Test eslint-plugin
run: yarn test:cov
working-directory: eslint-plugin

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
- name: Verify SonarQube plugin
run: mvn -e -B verify
working-directory: sonar-plugin

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: yarn install --immutable
- name: Test
run: yarn test:cov
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
24 changes: 0 additions & 24 deletions .github/workflows/check_version.yml

This file was deleted.

4 changes: 2 additions & 2 deletions eslint-plugin/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4314,11 +4314,11 @@ __metadata:

"typescript@patch:typescript@^5.0.3#~builtin<compat/typescript>":
version: 5.1.3
resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin<compat/typescript>::version=5.1.3&hash=1f5320"
resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin<compat/typescript>::version=5.1.3&hash=5da071"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 32a25b2e128a4616f999d4ee502aabb1525d5647bc8955e6edf05d7fbc53af8aa98252e2f6ba80bcedfc0260c982b885f3c09cfac8bb65d2924f3133ad1e1e62
checksum: 6f0a9dca6bf4ce9dcaf4e282aade55ef4c56ecb5fb98d0a4a5c0113398815aea66d871b5611e83353e5953a19ed9ef103cf5a76ac0f276d550d1e7cd5344f61e
languageName: node
linkType: hard

Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.organization=green-code-initiative
sonar.projectKey=green-code-initiative_ecoCode-linter
sonar.sources=eslint-plugin/lib/,eslint-plugin/tools/,sonar-plugin/src/main/java/
sonar.sources=eslint-plugin/lib/,sonar-plugin/src/main/java/
sonar.tests=eslint-plugin/tests/,sonar-plugin/src/test/java/
sonar.coverage.exclusions=eslint-plugin/tools/**/*
sonar.javascript.lcov.reportPaths=eslint-plugin/coverage/lcov.info
sonar.coverage.jacoco.xmlReportPaths=sonar-plugin/target/site/jacoco/jacoco.xml

0 comments on commit 6c7fdf3

Please sign in to comment.