Skip to content

Commit 0e0f223

Browse files
committed
Cache setting up JDK step
1 parent a36535d commit 0e0f223

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,22 @@ jobs:
2222

2323
steps:
2424
- name: Checkout repository for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }}
25+
if: ${{ github.event_name == 'pull_request' }}
2526
uses: actions/checkout@v4
2627
with:
2728
ref: ${{ github.event.pull_request.head.ref }}
2829
repository: ${{ github.event.pull_request.head.repo.full_name }}
2930

31+
- name: Checkout repository for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }}
32+
if: ${{ github.event_name != 'pull_request' }}
33+
uses: actions/checkout@v4
34+
3035
- name: Setup Node.js ${{ matrix.node }} for ${{ matrix.packages }} on ${{ matrix.os }}
3136
uses: actions/setup-node@v4
3237
with:
3338
node-version: ${{ matrix.node }}
3439
cache: 'yarn'
3540

36-
# - name: Install dependencies
37-
# run: yarn workspaces focus ${{ matrix.packages }}
38-
3941
- name: Mock the templates for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }}
4042
run: npx tsx scripts/mockTemplates.mts ${{ matrix.packages }}
4143

@@ -53,6 +55,7 @@ jobs:
5355
with:
5456
java-version: '17.x'
5557
distribution: 'temurin'
58+
cache: 'gradle'
5659

5760
- name: Build ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }}
5861
working-directory: example

0 commit comments

Comments
 (0)