feat(examples): add example-with-typeorm #19657
This file contains 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: Bench Turbotrace against @vercel/nft | |
on: | |
push: | |
# Runs on every commit on main | |
branches: [main] | |
paths: | |
- "crates/**" | |
- "Cargo.*" | |
- ".cargo/**" | |
- ".github/**" | |
- "rust-toolchain" | |
pull_request: | |
# Runs on PRs from bench/ prefixed branches | |
branches: [main] | |
jobs: | |
bench_vs_node_nft: | |
if: github.event_name == 'push' || startsWith(github.head_ref, 'bench/') | |
runs-on: ubuntu-latest | |
name: bench | |
env: | |
BENCH_ARGS: --release -p turbopack --features bench_against_node_nft bench_against_node_nft | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-node | |
with: | |
package-install: false | |
- uses: ./.github/actions/setup-rust | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install hoisted npm dependencies | |
working-directory: crates/turbopack/tests/node-file-trace | |
run: | | |
echo 'node-linker = "hoisted"' > .npmrc | |
pnpm install -r --side-effects-cache false | |
- name: Install nextest | |
uses: taiki-e/install-action@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tool: cargo-nextest@0.9.61 | |
- name: Build benchmark | |
timeout-minutes: 60 | |
run: | | |
cargo nextest run --no-run ${{ env.BENCH_ARGS }} | |
- name: Run benchmark | |
timeout-minutes: 60 | |
run: | | |
cargo nextest run --test-threads 1 --no-fail-fast ${{ env.BENCH_ARGS }} | |
- name: Show benchmark result | |
run: cargo xtask nft-bench-result |