Files
bun.sh/.github/workflows/format.yml
Meghan Denny 9212f1ffd9 use sudo
2025-08-08 20:45:33 -07:00

68 lines
1.8 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: |
source /etc/os-release
BASE_URL="http://apt.llvm.org"
LLVM_VERSION="19"
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y "deb ${BASE_URL}/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-${LLVM_VERSION} main"
sudo apt-get update
sudo apt-get install -y clang-format-${LLVM_VERSION}
- 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