diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index f77b85f..01254fd 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -15,41 +15,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Debug workspace and files - run: | - echo "Current directory: $(pwd)" - echo "Files in current directory:" - ls -la - echo "Checking for bun.lock:" - find . -name "bun.lock" -type f - echo "Hash of bun.lock:" - find . -name "bun.lock" -exec sha256sum {} \; - - - name: Cache node_modules - id: cache - uses: actions/cache@v4 - with: - path: node_modules - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} - restore-keys: | - ${{ runner.os }}-bun- - - - name: Debug cache result - run: | - echo "Cache hit: ${{ steps.cache.outputs.cache-hit }}" - echo "Cache key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}" - echo "Files after cache restore:" - ls -la - - name: Install Dependencies - run: bun i --frozen-lockfile + run: bun install --frozen-lockfile - - name: Debug after install - run: | - echo "Files after bun install:" - ls -la - echo "node_modules exists:" - test -d node_modules && echo "YES" || echo "NO" + - name: Upload node_modules artifact + uses: actions/upload-artifact@v3 + with: + name: node_modules + path: node_modules + retention-days: 1 type-check: runs-on: ubuntu-latest @@ -60,30 +34,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Debug workspace - run: | - echo "Current directory: $(pwd)" - echo "Files in current directory:" - ls -la - echo "Cache key would be: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}" - - - name: Cache node_modules - id: cache - uses: actions/cache@v4 + - name: Download node_modules artifact + uses: actions/download-artifact@v3 with: + name: node_modules path: node_modules - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} - restore-keys: | - ${{ runner.os }}-bun- - - - name: Debug cache result - run: | - echo "Cache hit: ${{ steps.cache.outputs.cache-hit }}" - echo "Files after cache restore:" - ls -la - - - name: Install dependencies - run: bun install --frozen-lockfile - name: Run type checking run: bun run check @@ -97,17 +52,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Cache node_modules - id: cache - uses: actions/cache@v4 + - name: Download node_modules artifact + uses: actions/download-artifact@v3 with: + name: node_modules path: node_modules - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} - restore-keys: | - ${{ runner.os }}-bun- - - - name: Install dependencies - run: bun install --frozen-lockfile - name: Run linting run: bun run lint:check @@ -121,17 +70,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Cache node_modules - id: cache - uses: actions/cache@v4 + - name: Download node_modules artifact + uses: actions/download-artifact@v3 with: + name: node_modules path: node_modules - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} - restore-keys: | - ${{ runner.os }}-bun- - - - name: Install dependencies - run: bun install --frozen-lockfile - name: Check formatting run: bun run format:check @@ -145,17 +88,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Cache node_modules - id: cache - uses: actions/cache@v4 + - name: Download node_modules artifact + uses: actions/download-artifact@v3 with: + name: node_modules path: node_modules - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} - restore-keys: | - ${{ runner.os }}-bun- - - - name: Install dependencies - run: bun install --frozen-lockfile - name: Build application run: bun run build