chore: add code owner #162
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| - name: Setup dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler | |
| corepack enable pnpm | |
| - name: Setup Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # 6.3.0 | |
| with: | |
| node-version: lts/* | |
| cache: "pnpm" | |
| cache-dependency-path: ui/pnpm-lock.yaml | |
| - name: Setup Rust toolchain | |
| run: rustup toolchain install stable --profile minimal | |
| - name: Setup environment | |
| run: sudo docker compose -f ci/docker-compose.yaml up -d | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 #2.9.1 | |
| - name: Cache UI build | |
| id: ui-cache | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # 5.0.4 | |
| with: | |
| path: ui/dist | |
| key: ui-dist-${{ hashFiles('ui/src/**', 'ui/index.html', 'ui/vite.config.ts', 'ui/tsconfig*.json', 'ui/package.json', 'ui/pnpm-lock.yaml') }} | |
| - name: Build UI | |
| if: steps.ui-cache.outputs.cache-hit != 'true' | |
| run: | | |
| pnpm -C ui install --frozen-lockfile | |
| pnpm -C ui build | |
| - name: Run Lint | |
| run: cargo clippy --all-targets --locked -- -D warnings | |
| - name: Build | |
| run: cargo build --locked | |
| - name: Run Test | |
| run: cargo test --locked | |
| - name: Run E2E Test | |
| run: | | |
| pnpm -C tests install --frozen-lockfile | |
| pnpm -C tests test | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # 7.0.0 | |
| with: | |
| name: binary-debug | |
| path: target/debug/aisix |