Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(CI) Improve CI (#13360)

Robert Pintilii61e9caccebe6
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3c7beba8d5..2d46be6542 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,14 +12,27 @@ jobs:
with:
node-version: 16
cache: 'npm'
+ - name: Get changed files
+ id: changed-files
+ uses: tj-actions/changed-files@v35
+ - name: Get changed lang files
+ id: lang-files
+ run: echo "all=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -oE 'lang\/\S+' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
+ - name: Get changed files for eslint
+ id: eslint-files
+ run: echo "files=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -oE '\S*(\.js|\.ts|\.tsx)(\s|$)' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
- run: npm install
- name: Check git status
run: git status
- name: Normalize lang files to ensure sorted
+ if: steps.lang-files.outputs.all
run: npm run lang-sort
+ - name: Check lang files are formatted correctly
+ if: steps.lang-files.outputs.all
+ run: npm run lint:lang
- name: Check if the git repository is clean
run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1)
- - run: npm run lint:ci
+ - run: npm run lint:ci --files=${{ steps.eslint-files.outputs.files }} && npm run tsc:ci
linux-build:
name: Build Frontend (Linux)
runs-on: ubuntu-latest
diff --git a/package.json b/package.json
index 6806d5a46f..e938cb5255 100644
--- a/package.json
+++ b/package.json
@@ -192,7 +192,7 @@
"tsc:web": "tsc --noEmit --project tsconfig.web.json",
"tsc:native": "tsc --noEmit --project tsconfig.native.json",
"tsc:ci": "npm run tsc:web && npm run tsc:native",
- "lint:ci": "eslint --ext .js,.ts,.tsx --max-warnings 0 . && npm run tsc:ci && npm run lint:lang",
+ "lint:ci": "eslint --ext .js,.ts,.tsx --max-warnings 0 ",
"lint:lang": "for file in lang/*.json; do npx --yes jsonlint -q $file || exit 1; done",
"lang-sort": "./resources/lang-sort.sh",
"lint-fix": "eslint --ext .js,.ts,.tsx --max-warnings 0 --fix .",