Skip to content

Commit

Permalink
[IT-3396] Switch jinja linter (#24)
Browse files Browse the repository at this point in the history
Switch to using a better jinja linter
  • Loading branch information
zaro0508 authored Apr 3, 2024
1 parent 08bf5b6 commit 134dc99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,9 @@ jobs:
with:
python-version: 3.9
- uses: pre-commit/[email protected]
jinja-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install jinja libraries
run: |
python -m pip install --upgrade jinja2==3.0.1
- name: Install jinja linter tool
run: git clone --single-branch https://github.com/drm/jinja2-lint.git /tmp/jinja2-lint && pushd /tmp/jinja2-lint && git checkout 75dcd5a
- name: Execute jinja linter
run: find . -type f -name "*.j2" -exec /tmp/jinja2-lint/j2lint.py '{}' +
deploy-agoradev-common:
if: github.ref == 'refs/heads/main'
needs: [pre-commit, jinja-lint]
needs: [pre-commit]
uses: "./.github/workflows/aws-deploy.yaml"
with:
role-to-assume: "arn:aws:iam::607346494281:role/sagebase-github-oidc-agora-infra-deploy"
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ repos:
hooks:
- id: check-github-workflows
- id: check-github-actions
- repo: https://github.com/aristanetworks/j2lint.git
rev: v1.1.0
hooks:
- id: j2lint
# args: [--ignore, S3, V1, --]

0 comments on commit 134dc99

Please sign in to comment.