Skip to content

github action fix

github action fix #3

Workflow file for this run

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 }}