From 0833c791acca2cfca3cbdefb7bdb0ffc1fc33dc0 Mon Sep 17 00:00:00 2001 From: Yongmin Hong Date: Sun, 16 Jun 2024 17:34:23 +0900 Subject: [PATCH] CI(GitHub Actions): add jsonlint, fix yamllint name Summary: Add JSONLint (not the jsonlint npm package) for json linting. Also fix yamllint to correct job name and add `.vscode` stuff. Signed-off-by: Yongmin Hong Test Plan: Just land it. Reviewers: O1 revi & automations, revi Reviewed By: O1 revi & automations, revi Differential Revision: https://issuetracker.revi.xyz/D336 --- .github/workflows/jsonlint.yml | 25 +++++++++++++++++++++++++ .github/workflows/yamlLint.yml | 5 +++-- .vscode/extensions.json | 9 +++++++++ .vscode/settings.json | 6 ++++++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/jsonlint.yml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.github/workflows/jsonlint.yml b/.github/workflows/jsonlint.yml new file mode 100644 index 0000000..e27f18d --- /dev/null +++ b/.github/workflows/jsonlint.yml @@ -0,0 +1,25 @@ +--- +name: JSON Lint +on: + push: + paths: + - '**.json' + - '.arc*' + - '**.sublime-settings' + pull_request: + paths: + - '**.json' + merge_group: + workflow_dispatch: + +jobs: + jsonlint: + runs-on: ubuntu-latest + steps: + - name: 'Checkout' + uses: actions/checkout@v4 + - name: Run JSON Lint + env: + REPORT_ONLY: true + SHOW_ERRORS: true + run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/json-lint/master/pipeline.sh) diff --git a/.github/workflows/yamlLint.yml b/.github/workflows/yamlLint.yml index 799150c..7a25a20 100644 --- a/.github/workflows/yamlLint.yml +++ b/.github/workflows/yamlLint.yml @@ -14,9 +14,10 @@ on: workflow_dispatch: jobs: - lint-everything: + yaml-lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: 'Checkout' + uses: actions/checkout@v4 - name: yaml-lint uses: ibiqlik/action-yamllint@v3 diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..f942c01 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "avive.arcanist", + "christian-kohler.npm-intellisense", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "github.vscode-github-actions" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e928215 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.sublime-settings": "jsonc", + ".gitaliases": "ignore" + } +}