mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
name: autofix.ci
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
merge_group:
|
|
push:
|
|
branches: ["main"]
|
|
env:
|
|
BUN_VERSION: "1.2.11"
|
|
LLVM_VERSION: "19.1.7"
|
|
LLVM_VERSION_MAJOR: "19"
|
|
|
|
jobs:
|
|
autofix:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global core.autocrlf true
|
|
git config --global core.ignorecase true
|
|
git config --global core.precomposeUnicode true
|
|
- name: Setup Bun
|
|
uses: ./.github/actions/setup-bun
|
|
with:
|
|
bun-version: ${{ env.BUN_VERSION }}
|
|
- name: Setup Dependencies
|
|
run: |
|
|
bun install
|
|
- name: Install LLVM
|
|
run: |
|
|
curl -fsSL https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ env.LLVM_VERSION_MAJOR }} all
|
|
- name: Setup Zig
|
|
uses: mlugg/setup-zig@v1
|
|
with:
|
|
version: 0.14.0
|
|
- name: Zig Format
|
|
run: |
|
|
zig fmt src
|
|
./scripts/sort-imports.ts src
|
|
zig fmt src
|
|
- name: Prettier Format
|
|
run: |
|
|
bun run prettier
|
|
- name: Clang Format
|
|
run: |
|
|
bun run clang-format
|
|
- name: Ban Words
|
|
run: |
|
|
bun ./test/internal/ban-words.test.ts
|
|
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
|