diff --git a/.github/workflows/lint-java.yml b/.github/workflows/lint-java.yml new file mode 100644 index 00000000..5a0f1ea2 --- /dev/null +++ b/.github/workflows/lint-java.yml @@ -0,0 +1,31 @@ +name: Lint Java + +on: + workflow_dispatch: + push: + branches: [master, main] + paths: ['web/documentserver-example/java/**'] + pull_request: + branches: [master, main, develop] + paths: ['web/documentserver-example/java/**'] + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web/documentserver-example/java + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install Java 11 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11' + + - name: Run linter + run: | + mvn -version + mvn package \ No newline at end of file diff --git a/.github/workflows/lint-nodejs.yml b/.github/workflows/lint-nodejs.yml new file mode 100644 index 00000000..d43821d6 --- /dev/null +++ b/.github/workflows/lint-nodejs.yml @@ -0,0 +1,35 @@ +name: ESLint + +on: + workflow_dispatch: + push: + branches: [master, main] + paths: ['web/documentserver-example/nodejs/**'] + pull_request: + branches: [master, main, develop] + paths: ['web/documentserver-example/nodejs/**'] + +env: + NODE_VERSION: 16 + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web/documentserver-example/nodejs + steps: + - name: Install NodeJS + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Code Checkout + uses: actions/checkout@v3 + + - name: Install Dependencies + run: npm ci + + - name: Code Linting + run: npm run lint \ No newline at end of file diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml new file mode 100644 index 00000000..b693d158 --- /dev/null +++ b/.github/workflows/lint-php.yml @@ -0,0 +1,29 @@ +name: PHPCs + +on: + workflow_dispatch: + push: + branches: [master, main] + paths: ['web/documentserver-example/php/**'] + pull_request: + branches: [master, main, develop] + paths: ['web/documentserver-example/php/**'] + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web/documentserver-example/php + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + tools: cs2pr, phpcs + + - name: Run phpcs + run: phpcs -q --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml --ignore=node_modules,bower_components,vendor ./ \ No newline at end of file diff --git a/.github/workflows/lint-python.yml b/.github/workflows/lint-python.yml new file mode 100644 index 00000000..e03b298a --- /dev/null +++ b/.github/workflows/lint-python.yml @@ -0,0 +1,39 @@ +name: PyLint + +on: + workflow_dispatch: + push: + branches: [master, main] + paths: ['web/documentserver-example/python/**'] + pull_request: + branches: [master, main, develop] + paths: ['web/documentserver-example/python/**'] + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web/documentserver-example/python + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.6.9 + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + pip install pylint + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint Flake8 + run: | + flake8 ./**/*.py --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 ./**/*.py --count --max-complexity=10 --max-line-length=79 --statistics + + - name: Lint Pylint + run: | + pylint ./**/*.py \ No newline at end of file diff --git a/.github/workflows/lint-ruby.yml b/.github/workflows/lint-ruby.yml new file mode 100644 index 00000000..241f4cc4 --- /dev/null +++ b/.github/workflows/lint-ruby.yml @@ -0,0 +1,25 @@ +name: RuboCop Linter + +on: + workflow_dispatch: + push: + branches: [master, main] + paths: ['web/documentserver-example/ruby/**'] + pull_request: + branches: [master, main, develop] + paths: ['web/documentserver-example/ruby/**'] + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web/documentserver-example/ruby + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: RuboCop Linter Action + uses: andrewmcodes/rubocop-linter-action@v3.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/lint-spring.yml b/.github/workflows/lint-spring.yml new file mode 100644 index 00000000..c835eb3a --- /dev/null +++ b/.github/workflows/lint-spring.yml @@ -0,0 +1,31 @@ +name: Lint Spring + +on: + workflow_dispatch: + push: + branches: [master, main] + paths: ['web/documentserver-example/java-spring/**'] + pull_request: + branches: [master, main, develop] + paths: ['web/documentserver-example/java-spring/**'] + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web/documentserver-example/java-spring + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install Java 11 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11' + + - name: Run linter + run: | + mvn -version + mvn package \ No newline at end of file