-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (61 loc) · 2.02 KB
/
ci-optimized.yml
File metadata and controls
67 lines (61 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI/CD Optimized
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
inputs:
reason:
description: "Reason for manual CI trigger"
required: false
default: "Manual CI execution"
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
ci:
uses: docdyhr/.github/.github/workflows/rust-ci.yml@v1
with:
binary-name: batless
secrets: inherit # pragma: allowlist secret
# Extended integration smoke tests (batless-specific)
integration-smoke:
name: Integration Smoke
needs: ci
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Build and smoke test
run: |
cargo build --release
./target/release/batless --version
./target/release/batless README.md --mode=plain --max-lines=5
./target/release/batless Cargo.toml --mode=json --max-lines=3
# Benchmark gate — main only
benchmark:
name: Performance Benchmark
if: github.ref == 'refs/heads/main'
needs: ci
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Run benchmarks
run: |
cargo build --release
echo "Benchmarks would run here"