|
49 | 49 | packages/*/node_modules |
50 | 50 | retention-days: 1 |
51 | 51 |
|
52 | | - # Build web in parallel |
53 | | - build-web: |
| 52 | + # Build and check |
| 53 | + build-and-check: |
54 | 54 | needs: setup |
55 | 55 | runs-on: ubuntu-latest |
56 | 56 | steps: |
@@ -79,65 +79,13 @@ jobs: |
79 | 79 | echo "NEXT_PUBLIC_CB_ENVIRONMENT=test" >> $GITHUB_ENV |
80 | 80 | echo "CODEBUFF_GITHUB_TOKEN=${{ secrets.CODEBUFF_GITHUB_TOKEN }}" >> $GITHUB_ENV |
81 | 81 |
|
82 | | - - name: Build web |
| 82 | + - name: Typecheck and Build web in parallel |
83 | 83 | run: | |
84 | | - cd web && bun run build |
85 | | -
|
86 | | - # Typecheck in parallel |
87 | | - typecheck: |
88 | | - needs: setup |
89 | | - runs-on: ubuntu-latest |
90 | | - steps: |
91 | | - - name: Checkout repository |
92 | | - uses: actions/checkout@v3 |
93 | | - |
94 | | - - name: Set up Bun |
95 | | - uses: oven-sh/setup-bun@v2 |
96 | | - with: |
97 | | - bun-version: '1.2.12' |
98 | | - |
99 | | - - name: Download node_modules |
100 | | - uses: actions/download-artifact@v4 |
101 | | - with: |
102 | | - name: node_modules |
103 | | - |
104 | | - - name: Set environment variables |
105 | | - env: |
106 | | - SECRETS_CONTEXT: ${{ toJSON(secrets) }} |
107 | | - run: | |
108 | | - VAR_NAMES=$(node scripts/generate-ci-env.js) |
109 | | - echo "$SECRETS_CONTEXT" | jq -r --argjson vars "$VAR_NAMES" ' |
110 | | - to_entries | .[] | select(.key as $k | $vars | index($k)) | .key + "=" + .value |
111 | | - ' >> $GITHUB_ENV |
112 | | - echo "CODEBUFF_GITHUB_ACTIONS=true" >> $GITHUB_ENV |
113 | | - echo "NEXT_PUBLIC_CB_ENVIRONMENT=test" >> $GITHUB_ENV |
114 | | - echo "CODEBUFF_GITHUB_TOKEN=${{ secrets.CODEBUFF_GITHUB_TOKEN }}" >> $GITHUB_ENV |
115 | | -
|
116 | | - - name: Typecheck |
117 | | - run: | |
118 | | - bun run typecheck |
119 | | -
|
120 | | - # Build npm-app in parallel |
121 | | - build: |
122 | | - needs: setup |
123 | | - runs-on: ubuntu-latest |
124 | | - steps: |
125 | | - - name: Checkout repository |
126 | | - uses: actions/checkout@v3 |
127 | | - |
128 | | - - name: Set up Bun |
129 | | - uses: oven-sh/setup-bun@v2 |
130 | | - with: |
131 | | - bun-version: '1.2.12' |
132 | | - |
133 | | - - name: Download node_modules |
134 | | - uses: actions/download-artifact@v4 |
135 | | - with: |
136 | | - name: node_modules |
137 | | - |
138 | | - - name: Build |
139 | | - run: | |
140 | | - cd npm-app && bun run build |
| 84 | + timeout 10m bash -c ' |
| 85 | + bun run typecheck & |
| 86 | + cd web && bun run build & |
| 87 | + wait |
| 88 | + ' |
141 | 89 |
|
142 | 90 | # - name: Open interactive debug shell |
143 | 91 | # if: ${{ failure() }} |
|
146 | 94 |
|
147 | 95 | # Template for test jobs |
148 | 96 | test: |
149 | | - needs: [build-web, typecheck, build] |
| 97 | + needs: [build-and-check] |
150 | 98 | strategy: |
151 | 99 | matrix: |
152 | 100 | package: [npm-app, backend, common] |
@@ -197,7 +145,7 @@ jobs: |
197 | 145 |
|
198 | 146 | # Integration tests job |
199 | 147 | test-integration: |
200 | | - needs: [build-web, typecheck, build] |
| 148 | + needs: [build-and-check] |
201 | 149 | strategy: |
202 | 150 | matrix: |
203 | 151 | package: [npm-app, backend, common] |
|
0 commit comments