Bläddra i källkod

Use cache to speed up jobs

tags/v2.2.0^2^2
9seconds 1 månad sedan
förälder
incheckning
3db1be0687
1 ändrade filer med 30 tillägg och 0 borttagningar
  1. 30
    0
      .github/workflows/ci.yaml

+ 30
- 0
.github/workflows/ci.yaml Visa fil

@@ -48,6 +48,16 @@ jobs:
48 48
       - uses: jdx/mise-action@v3
49 49
         name: Install mise
50 50
 
51
+      - name: Cache Go modules and build
52
+        uses: actions/cache@v5
53
+        with:
54
+          path: |
55
+            ~/go/pkg/mod
56
+            ~/.cache/go-build
57
+          key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
58
+          restore-keys: |
59
+            ${{ runner.os }}-go-
60
+
51 61
       - name: Run tests
52 62
         run: mise tasks run covtest
53 63
 
@@ -69,6 +79,16 @@ jobs:
69 79
       - uses: jdx/mise-action@v3
70 80
         name: Install mise
71 81
 
82
+      - name: Cache Go modules and build
83
+        uses: actions/cache@v5
84
+        with:
85
+          path: |
86
+            ~/go/pkg/mod
87
+            ~/.cache/go-build
88
+          key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
89
+          restore-keys: |
90
+            ${{ runner.os }}-go-
91
+
72 92
       - name: Run fuzzing
73 93
         run: mise tasks run 'test:fuzz:*'
74 94
 
@@ -86,6 +106,16 @@ jobs:
86 106
       - uses: jdx/mise-action@v3
87 107
         name: Install mise
88 108
 
109
+      - name: Cache Go modules and build
110
+        uses: actions/cache@v5
111
+        with:
112
+          path: |
113
+            ~/go/pkg/mod
114
+            ~/.cache/go-build
115
+          key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
116
+          restore-keys: |
117
+            ${{ runner.os }}-go-
118
+
89 119
       - name: Run linter
90 120
         run: mise tasks run lint
91 121
 

Laddar…
Avbryt
Spara