Skip to content

Commit

Permalink
feat: add gitlab and github lint CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoub3bidi committed Feb 18, 2024
1 parent c1491cc commit 40ff34a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Linter

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Run linter
run: |
setsid ./ci/lint.sh
14 changes: 13 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
stages:
- test
- lint

unit_test:
stage: test
Expand All @@ -21,4 +22,15 @@ integration_test:
- /^(main|develop.*)$/
- merge_requests
tags:
- imagesbuilder
- imagesbuilder

lint:
stage: lint
script:
- setsid ./ci/lint.sh
only:
refs:
- /^(main|develop.*)$/
- merge_requests
tags:
- imagesbuilder
3 changes: 3 additions & 0 deletions ci/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

docker-compose up --build --abort-on-container-exit mercury_linter

0 comments on commit 40ff34a

Please sign in to comment.