|
6 | 6 | pull_request:
|
7 | 7 | branches: [ master ]
|
8 | 8 |
|
9 |
| -env: |
10 |
| - CARGO_TERM_COLOR: always |
11 |
| - |
12 | 9 | jobs:
|
13 | 10 | test:
|
14 |
| - name: Test Suite |
| 11 | + name: Build and Test |
15 | 12 | runs-on: ubuntu-latest
|
16 | 13 | steps:
|
17 |
| - - uses: actions/checkout@v4 |
18 |
| - - uses: dtolnay/rust-toolchain@stable |
19 |
| - - uses: Swatinem/rust-cache@v2 |
20 |
| - - name: Run tests |
21 |
| - run: cargo test --workspace |
22 |
| - - name: Run doctests |
23 |
| - run: cargo test --workspace --doc |
24 |
| - - name: Validate examples |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Setup Node.js |
| 18 | + uses: actions/setup-node@v4 |
| 19 | + with: |
| 20 | + node-version: '18' |
| 21 | + cache: 'npm' |
| 22 | + |
| 23 | + - name: Install dependencies |
| 24 | + run: npm ci |
| 25 | + |
| 26 | + - name: Type check |
| 27 | + run: npm run astro check |
| 28 | + |
| 29 | + - name: Build |
| 30 | + run: npm run build |
| 31 | + |
| 32 | + - name: Validate build output |
25 | 33 | run: |
|
26 |
| - if [ -d "examples" ]; then |
27 |
| - EXAMPLE_COUNT=$(find examples/ -name "*.sigmos" -type f | wc -l) |
28 |
| - echo "✓ Found $EXAMPLE_COUNT SIGMOS example files" |
| 34 | + if [ -d "dist" ]; then |
| 35 | + echo "✓ Build successful - dist directory created" |
| 36 | + ls -la dist/ |
29 | 37 | else
|
30 |
| - echo "No examples directory found" |
| 38 | + echo "❌ Build failed - no dist directory found" |
| 39 | + exit 1 |
31 | 40 | fi
|
32 | 41 |
|
33 |
| - fmt: |
34 |
| - name: Rustfmt |
| 42 | + lint: |
| 43 | + name: Lint and Format Check |
35 | 44 | runs-on: ubuntu-latest
|
36 | 45 | steps:
|
37 |
| - - uses: actions/checkout@v4 |
38 |
| - - uses: dtolnay/rust-toolchain@stable |
| 46 | + - name: Checkout |
| 47 | + uses: actions/checkout@v4 |
| 48 | + |
| 49 | + - name: Setup Node.js |
| 50 | + uses: actions/setup-node@v4 |
39 | 51 | with:
|
40 |
| - components: rustfmt |
41 |
| - - name: Enforce formatting |
42 |
| - run: cargo fmt --check |
43 |
| - |
44 |
| - clippy: |
45 |
| - name: Clippy |
46 |
| - runs-on: ubuntu-latest |
47 |
| - steps: |
48 |
| - - uses: actions/checkout@v4 |
49 |
| - - uses: dtolnay/rust-toolchain@stable |
50 |
| - with: |
51 |
| - components: clippy |
52 |
| - - uses: Swatinem/rust-cache@v2 |
53 |
| - - name: Linting (Zero Warnings Policy) |
54 |
| - run: cargo clippy --workspace --all-targets --all-features -- -D warnings |
55 |
| - |
56 |
| - docs: |
57 |
| - name: Docs |
58 |
| - runs-on: ubuntu-latest |
59 |
| - steps: |
60 |
| - - uses: actions/checkout@v4 |
61 |
| - - uses: dtolnay/rust-toolchain@stable |
62 |
| - - uses: Swatinem/rust-cache@v2 |
63 |
| - - name: Check documentation |
64 |
| - run: cargo doc --workspace --no-deps --document-private-items |
65 |
| - - name: Test documentation |
66 |
| - run: cargo test --workspace --doc |
| 52 | + node-version: '18' |
| 53 | + cache: 'npm' |
| 54 | + |
| 55 | + - name: Install dependencies |
| 56 | + run: npm ci |
| 57 | + |
| 58 | + - name: Check formatting |
| 59 | + run: npm run format:check |
| 60 | + continue-on-error: true |
| 61 | + |
| 62 | + - name: Lint code |
| 63 | + run: npm run lint |
| 64 | + continue-on-error: true |
67 | 65 |
|
68 | 66 | security_audit:
|
69 | 67 | name: Security Audit
|
|
0 commit comments