From 6b274344ccb508c7be71dc7bc1ed4232684bcc11 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:41:23 +0100 Subject: [PATCH] Add various linting to as compose services --- .github/workflows/checks.yml | 27 +++++++++------------------ .github/yamllint.yml | 3 +++ docker-compose.yml | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 18 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f5e2184c..b320c39b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -56,36 +56,27 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: "3.11" + - uses: ./.github/prepare-docker-image - - run: >- - pip install yamllint==1.32.0 && - yamllint -c .github/yamllint.yml -s . + - name: Run yamllint + run: eval $DOCKER_RUN yamllint csslint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 20 + - uses: ./.github/prepare-docker-image - - run: >- - npm install stylelint@15.11.0 stylelint-config-standard@34.0.0 -g && - stylelint "**/*.css" --config .github/.stylelintrc.json + - name: Run yamllint + run: eval $DOCKER_RUN csslint tslint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 20 + - uses: ./.github/prepare-docker-image - - run: >- - npm install typescript@5.2.2 -g && - tsc --noEmit -p .github/tsconfig.json + - name: Run yamllint + run: eval $DOCKER_RUN tslint diff --git a/.github/yamllint.yml b/.github/yamllint.yml index 4e40c651..65eca5cc 100644 --- a/.github/yamllint.yml +++ b/.github/yamllint.yml @@ -1,5 +1,8 @@ extends: default +ignore: | + config/reverser_custom_config.yml + rules: document-start: disable line-length: disable diff --git a/docker-compose.yml b/docker-compose.yml index d32085b1..6ab4f04d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,6 +76,42 @@ services: profiles: - rubocop + yamllint: + build: + dockerfile_inline: | + FROM python:3.11-alpine3.19 + RUN pip install yamllint==1.32.0 + WORKDIR /app + volumes: + - .:/app + entrypoint: yamllint -c .github/yamllint.yml -s . + profiles: + - yamllint + + csslint: + build: + dockerfile_inline: | + FROM node:20-alpine3.19 + RUN npm install stylelint@15.11.0 stylelint-config-standard@34.0.0 -g + WORKDIR /app + volumes: + - .:/app + entrypoint: stylelint "**/*.css" --config .github/.stylelintrc.json + profiles: + - csslint + + tslint: + build: + dockerfile_inline: | + FROM node:20-alpine3.19 + RUN npm install typescript@5.2.2 -g + WORKDIR /app + volumes: + - .:/app + entrypoint: tsc --noEmit -p .github/tsconfig.json + profiles: + - tslint + tests: image: reverser environment: