mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 18:08:15 +02:00
This reverts commitsbf333eaea2and6f69a445bd. The commit linter needs to run on event `pull_request_target` to have access to its secret token, which means we cannot have a dependency on that job from another workflow that is run as a result of the `pull_request` event. Additionally, the linters were no longer run for first-time contributors. This isn't a huge problem but it was nice that a preliminary check took place before running the full CI on their PRs.
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
name: Lint Code
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: macos-14
|
|
if: github.repository == 'LadybirdBrowser/ladybird'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set Up Environment
|
|
shell: bash
|
|
run: |
|
|
set -e
|
|
|
|
brew install curl flake8 llvm@19 ninja optipng shellcheck swift-format unzip
|
|
|
|
# Note: gn isn't available in homebrew :(
|
|
# Corresponds to https://gn.googlesource.com/gn/+/225e90c5025bf74f41dbee60d9cde4512c846fe7
|
|
curl -L -o gn-mac-arm64.zip "https://chrome-infra-packages.appspot.com/dl/gn/gn/mac-arm64/+/786UV5-XW0Bz6QnRFxKtnzTSVq0ta5AU1KXRJs-ZNwcC"
|
|
unzip gn-mac-arm64.zip -d ${{ github.workspace }}/bin
|
|
chmod +x ${{ github.workspace }}/bin/gn
|
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
echo -n "gn version: "
|
|
${{ github.workspace}}/bin/gn --version
|
|
|
|
- name: Install JS Dependencies
|
|
shell: bash
|
|
run: npm install -g prettier@3.3.3
|
|
|
|
- name: Lint
|
|
run: ${{ github.workspace }}/Meta/lint-ci.sh
|