|
1 | | -name: Tests |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: [main, master, develop] |
6 | | - pull_request: |
7 | | - branches: [main, master, develop] |
8 | | - |
9 | | -permissions: |
10 | | - contents: read |
11 | | - |
12 | 1 | jobs: |
13 | 2 | test: |
14 | 3 | name: Run Tests |
15 | | - runs-on: ${{ matrix.os }} |
16 | | - |
17 | | - strategy: |
18 | | - fail-fast: false |
19 | | - matrix: |
20 | | - os: [ubuntu-latest, macos-latest] |
21 | | - bun-version: ["latest", "1.1"] |
22 | | - |
| 4 | + runs-on: ubuntu-latest # Simplified to Ubuntu only for debugging |
| 5 | + |
23 | 6 | steps: |
24 | 7 | - name: Checkout repository |
25 | 8 | uses: actions/checkout@v4 |
26 | 9 |
|
27 | 10 | - name: Setup Bun |
28 | 11 | uses: oven-sh/setup-bun@v2 |
29 | 12 | with: |
30 | | - bun-version: ${{ matrix.bun-version }} |
| 13 | + bun-version: latest |
31 | 14 |
|
| 15 | + # Changed to regular install to see if lockfile was the issue |
32 | 16 | - name: Install dependencies |
33 | | - run: bun install --frozen-lockfile |
| 17 | + run: bun install |
34 | 18 |
|
| 19 | + # Removed continue-on-error to catch TS issues immediately |
35 | 20 | - name: Type check |
36 | 21 | run: bun run tsc --noEmit |
37 | | - continue-on-error: true |
38 | 22 |
|
39 | 23 | - name: Run tests |
40 | | - run: bun test --timeout 30000 |
41 | | - |
42 | | - lint: |
43 | | - name: Lint & Format |
44 | | - runs-on: ubuntu-latest |
45 | | - |
46 | | - steps: |
47 | | - - name: Checkout repository |
48 | | - uses: actions/checkout@v4 |
49 | | - |
50 | | - - name: Setup Bun |
51 | | - uses: oven-sh/setup-bun@v2 |
52 | | - with: |
53 | | - bun-version: latest |
54 | | - |
55 | | - - name: Install dependencies |
56 | | - run: bun install --frozen-lockfile |
57 | | - |
58 | | - - name: Check formatting |
59 | | - run: bunx prettier --check "src/**/*.{ts,tsx,js,json}" |
60 | | - continue-on-error: true |
61 | | - |
62 | | - - name: Lint |
63 | | - run: bunx eslint "src/**/*.ts" |
64 | | - continue-on-error: true |
65 | | - |
66 | | - build: |
67 | | - name: Build |
68 | | - runs-on: ubuntu-latest |
69 | | - needs: [test] |
70 | | - |
71 | | - steps: |
72 | | - - name: Checkout repository |
73 | | - uses: actions/checkout@v4 |
74 | | - |
75 | | - - name: Setup Bun |
76 | | - uses: oven-sh/setup-bun@v2 |
77 | | - with: |
78 | | - bun-version: latest |
79 | | - |
80 | | - - name: Install dependencies |
81 | | - run: bun install --frozen-lockfile |
82 | | - |
83 | | - - name: Build |
84 | | - run: bun build ./src/index.ts --outdir ./dist --target bun |
85 | | - |
86 | | - - name: Verify build output |
87 | | - run: | |
88 | | - test -d dist |
89 | | - test -f dist/index.js |
90 | | - echo "Build output verified successfully" |
91 | | -
|
92 | | - - name: Upload build artifact |
93 | | - uses: actions/upload-artifact@v4 |
94 | | - with: |
95 | | - name: dist |
96 | | - path: dist/ |
97 | | - retention-days: 7 |
| 24 | + # Increased timeout for CI environment |
| 25 | + run: bun test --timeout 60000 |
0 commit comments