diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 4d81c7f233b2..cd82966591ce 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -25,7 +25,7 @@ jobs: # Parse version from head branch text: ${{ github.head_ref }} # match: preprare-release/xx.xx.xx - regex: '^preprare-release\/(\d+\.\d+\.\d+)$' + regex: '^prepare-release\/(\d+\.\d+\.\d+)$' - name: Prepare release uses: getsentry/action-prepare-release@v1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5f73684e0ff..fe9c60106d7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,6 @@ env: NX_CACHE_RESTORE_KEYS: | nx-Linux-${{ github.ref }}-${{ github.event.inputs.commit || github.sha }} nx-Linux-${{ github.ref }} - nx-Linux-refs/heads/develop nx-Linux jobs: @@ -173,6 +172,7 @@ jobs: key: ${{ steps.compute_lockfile_hash.outputs.hash }} - name: Install dependencies + if: steps.cache_dependencies.outputs.cache_hit != 'true' run: yarn install --ignore-engines --frozen-lockfile outputs: dependency_cache_key: ${{ steps.compute_lockfile_hash.outputs.hash }} @@ -212,7 +212,7 @@ jobs: needs.job_get_metadata.outputs.is_release == 'false' && needs.job_get_metadata.outputs.force_skip_cache == 'false' with: - path: node_modules/.cache/nx + path: .nxcache key: nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT }} # On develop branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it restore-keys: @@ -244,12 +244,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -288,12 +288,12 @@ jobs: # use Node 14 for now. node-version: '14' - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -319,12 +319,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -344,12 +344,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -370,12 +370,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -407,12 +407,12 @@ jobs: with: node-version: ${{ env.DEFAULT_NODE_VERSION }} - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -442,12 +442,12 @@ jobs: with: node-version: ${{ matrix.node }} - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -480,12 +480,12 @@ jobs: with: node-version: ${{ matrix.node }} - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -551,12 +551,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -609,12 +609,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -639,12 +639,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -677,12 +677,12 @@ jobs: with: node-version: ${{ matrix.node }} - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -713,12 +713,12 @@ jobs: with: node-version: ${{ matrix.node }} - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -747,12 +747,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} @@ -810,12 +810,12 @@ jobs: - name: Set up Node uses: volta-cli/action@v4 - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check build cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ env.BUILD_CACHE_KEY }} diff --git a/.gitignore b/.gitignore index d822f532c8cc..8574a81de0a4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ sentry-node-serverless-*.zip jest/transformers/*.js # node tarballs packages/*/sentry-*.tgz +.nxcache # logs yarn-error.log diff --git a/.prettierignore b/.prettierignore index dd449725e188..f2ddf012c98e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ *.md +.nxcache diff --git a/nx.json b/nx.json index 1020417113c4..a4cbbbcd85da 100644 --- a/nx.json +++ b/nx.json @@ -8,7 +8,8 @@ "build:transpile", "build:types", "lint:eslint" - ] + ], + "cacheDirectory": ".nxcache" } } }, diff --git a/package.json b/package.json index 40dc91097f47..8a2d6c862d1a 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "circularDepCheck": "lerna run circularDepCheck", "clean": "run-p clean:build clean:caches", "clean:build": "lerna run clean", - "clean:caches": "yarn rimraf eslintcache && yarn jest --clearCache", + "clean:caches": "yarn rimraf eslintcache .nxcache && yarn jest --clearCache", "clean:deps": "lerna clean --yes && rm -rf node_modules && yarn", "clean:all": "run-p clean:build clean:caches clean:deps", "codecov": "codecov",