diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 101a50a..c12b2e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/.github/workflows/check_version.yml b/.github/workflows/check_version.yml deleted file mode 100644 index 5387721..0000000 --- a/.github/workflows/check_version.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Check package version - -on: - pull_request: - types: [ opened, synchronize, reopened ] - -jobs: - check-version: - name: Check version bump - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Use Node.js 18 - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Check version - run: yarn version check diff --git a/eslint-plugin/yarn.lock b/eslint-plugin/yarn.lock index c5b67db..29b6a68 100644 --- a/eslint-plugin/yarn.lock +++ b/eslint-plugin/yarn.lock @@ -4314,11 +4314,11 @@ __metadata: "typescript@patch:typescript@^5.0.3#~builtin": version: 5.1.3 - resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin::version=5.1.3&hash=1f5320" + resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin::version=5.1.3&hash=5da071" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 32a25b2e128a4616f999d4ee502aabb1525d5647bc8955e6edf05d7fbc53af8aa98252e2f6ba80bcedfc0260c982b885f3c09cfac8bb65d2924f3133ad1e1e62 + checksum: 6f0a9dca6bf4ce9dcaf4e282aade55ef4c56ecb5fb98d0a4a5c0113398815aea66d871b5611e83353e5953a19ed9ef103cf5a76ac0f276d550d1e7cd5344f61e languageName: node linkType: hard diff --git a/sonar-project.properties b/sonar-project.properties index d472308..24b81ee 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -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