Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Use Inlang CLI #81

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
run: exit 1

- name: 🔧 Check Inlang config
run: pnpm ci:update-inlang
run: pnpx @inlang/cli config update --match-sdk-version

- name: 🔍 Detect file changes
id: detect-changes-inlang
Expand All @@ -130,19 +130,28 @@ jobs:
if: needs.permissions-check.outputs.has-permissions == 'true' && steps.auto-commit-action-inlang.outputs.changes_detected == 'true'
run: exit 1

- name: ✨ Check localizations
id: inlang-lint
run: pnpx @inlang/cli lint

- name: ❌ Fail if localizations are not valid
if: failure() && steps.inlang-lint.conclusion == 'failure'
run: exit 1

- name: ✨ Check Svelte format
id: svelte-format
run: pnpm check

- name: ✨ Check style with Prettier & ESLint
id: lint-check
id: lint
run: pnpm lint

- name: 🔧 Fix lint
if: failure() && needs.permissions-check.outputs.has-permissions == 'true'
if: failure() && needs.permissions-check.outputs.has-permissions == 'true' && (steps.svelte-format.conclusion == 'failure' || steps.lint.conclusion == 'failure')
run: pnpm format

- name: 📤 Commit lint fixes
if: failure() && needs.permissions-check.outputs.has-permissions == 'true'
if: failure() && needs.permissions-check.outputs.has-permissions == 'true' && (steps.svelte-format.conclusion == 'failure' || steps.lint.conclusion == 'failure')
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix lint
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"ci:update-inlang": "node ./scripts/update-inlang-config.js",
"prepare": "husky install"
},
"devDependencies": {
Expand Down
41 changes: 0 additions & 41 deletions scripts/update-inlang-config.js

This file was deleted.

Loading