mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(CI) Improve CI (#13360)
Only run lang steps (sort and jsonlint) if there is at least one changed lang file Run eslint only on the changed files (.js, .ts, .tsx)
This commit is contained in:
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user