Skip to content

Commit

Permalink
Add various linting to as compose services
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Jan 25, 2024
1 parent f357d0b commit 6b27434
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] [email protected] -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 [email protected] -g &&
tsc --noEmit -p .github/tsconfig.json
- name: Run yamllint
run: eval $DOCKER_RUN tslint
3 changes: 3 additions & 0 deletions .github/yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
extends: default

ignore: |
config/reverser_custom_config.yml
rules:
document-start: disable
line-length: disable
Expand Down
36 changes: 36 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] [email protected] -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 [email protected] -g
WORKDIR /app
volumes:
- .:/app
entrypoint: tsc --noEmit -p .github/tsconfig.json
profiles:
- tslint

tests:
image: reverser
environment:
Expand Down

0 comments on commit 6b27434

Please sign in to comment.