mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 11:51:51 +00:00
chore: Start making use of Mozilla's linter, p=#12656
This commit is contained in:
32
.github/workflows/code-linter.yml
vendored
32
.github/workflows/code-linter.yml
vendored
@@ -28,20 +28,32 @@ jobs:
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- name: Setup and run autopep8
|
||||
if: ${{ contains(join(github.event.commits.*.modified, ' '), '.py') || contains(join(github.event.commits.*.added, ' '), '.py') || contains(join(github.event.commits.*.removed, ' '), '.py') }}
|
||||
run: |
|
||||
sudo apt install python3-autopep8
|
||||
autopep8 --diff scripts/ src/
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Download Firefox
|
||||
env:
|
||||
ZEN_DOWNLOAD_DONT_INIT_GIT: "1"
|
||||
- name: Restore Surfer engine cache
|
||||
id: surfer-engine-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .surfer/engine/*.tar
|
||||
key: surfer-engine-${{ hashFiles('surfer.json') }}
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
npm run download
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Download Firefox
|
||||
run: npm run download
|
||||
|
||||
- name: Import patches
|
||||
run: npm run import
|
||||
|
||||
- name: Add .hgignore file to the engine dir
|
||||
run: touch engine/.hgignore
|
||||
|
||||
- name: Run Bootstrap
|
||||
run: npm run bootstrap
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
24
.github/workflows/pr-test.yml
vendored
24
.github/workflows/pr-test.yml
vendored
@@ -28,13 +28,29 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Restore Surfer engine cache
|
||||
id: surfer-engine-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .surfer/engine/*.tar
|
||||
key: surfer-engine-${{ hashFiles('surfer.json') }}
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Download Firefox and dependencies
|
||||
env:
|
||||
ZEN_DOWNLOAD_DONT_INIT_GIT: "1"
|
||||
run: npm run download
|
||||
|
||||
- name: Run linting
|
||||
run: npm run lint
|
||||
- name: Run Bootstrap
|
||||
run: npm run bootstrap
|
||||
|
||||
- name: Add .hgignore file to the engine dir
|
||||
run: touch engine/.hgignore
|
||||
|
||||
- name: Import patches
|
||||
run: npm run import
|
||||
|
||||
- name: Run linting
|
||||
run: npm run lint
|
||||
|
||||
9
.github/workflows/sync-upstream.yml
vendored
9
.github/workflows/sync-upstream.yml
vendored
@@ -73,8 +73,9 @@ jobs:
|
||||
npm run sync
|
||||
fi
|
||||
|
||||
- name: Install autopep8
|
||||
run: sudo apt install python3-autopep8
|
||||
- name: Run Bootstrap
|
||||
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
|
||||
run: npm run bootstrap
|
||||
|
||||
- name: Install requirements
|
||||
run: pip3 install -r requirements.txt
|
||||
@@ -82,7 +83,7 @@ jobs:
|
||||
- name: Check if any files changed
|
||||
id: git-check
|
||||
run: |
|
||||
npm run pretty
|
||||
npm run lint:fix
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "files_changed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
@@ -119,7 +120,7 @@ jobs:
|
||||
- name: Run formatter
|
||||
if: steps.check-upstream-branch.outputs.branch_exists == 'false'
|
||||
run: |
|
||||
npm run pretty
|
||||
npm run lint:fix
|
||||
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
|
||||
Reference in New Issue
Block a user