mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 08:02:36 +09:00 
			
		
		
		
	Enable npm cache on setup-node action (#30577)
				
					
				
			Enable npm dependency cache in [setup-node](https://github.com/actions/setup-node). This should work reliably and across branches as well.
This commit is contained in:
		
							
								
								
									
										8
									
								
								.github/workflows/pull-compliance.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/pull-compliance.yml
									
									
									
									
										vendored
									
									
								
							@@ -38,6 +38,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: pip install poetry
 | 
					      - run: pip install poetry
 | 
				
			||||||
      - run: make deps-py
 | 
					      - run: make deps-py
 | 
				
			||||||
      - run: make deps-frontend
 | 
					      - run: make deps-frontend
 | 
				
			||||||
@@ -65,6 +67,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: make deps-frontend
 | 
					      - run: make deps-frontend
 | 
				
			||||||
      - run: make lint-swagger
 | 
					      - run: make lint-swagger
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -134,6 +138,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: make deps-frontend
 | 
					      - run: make deps-frontend
 | 
				
			||||||
      - run: make lint-frontend
 | 
					      - run: make lint-frontend
 | 
				
			||||||
      - run: make checks-frontend
 | 
					      - run: make checks-frontend
 | 
				
			||||||
@@ -181,6 +187,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: make deps-frontend
 | 
					      - run: make deps-frontend
 | 
				
			||||||
      - run: make lint-md
 | 
					      - run: make lint-md
 | 
				
			||||||
      - run: make docs
 | 
					      - run: make docs
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/pull-e2e-tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/pull-e2e-tests.yml
									
									
									
									
										vendored
									
									
								
							@@ -24,6 +24,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: make deps-frontend frontend deps-backend
 | 
					      - run: make deps-frontend frontend deps-backend
 | 
				
			||||||
      - run: npx playwright install --with-deps
 | 
					      - run: npx playwright install --with-deps
 | 
				
			||||||
      - run: make test-e2e-sqlite
 | 
					      - run: make test-e2e-sqlite
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/release-nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release-nightly.yml
									
									
									
									
										vendored
									
									
								
							@@ -25,6 +25,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: make deps-frontend deps-backend
 | 
					      - run: make deps-frontend deps-backend
 | 
				
			||||||
      # xgo build
 | 
					      # xgo build
 | 
				
			||||||
      - run: make release
 | 
					      - run: make release
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/release-tag-rc.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release-tag-rc.yml
									
									
									
									
										vendored
									
									
								
							@@ -24,6 +24,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: make deps-frontend deps-backend
 | 
					      - run: make deps-frontend deps-backend
 | 
				
			||||||
      # xgo build
 | 
					      # xgo build
 | 
				
			||||||
      - run: make release
 | 
					      - run: make release
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/release-tag-version.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release-tag-version.yml
									
									
									
									
										vendored
									
									
								
							@@ -26,6 +26,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/setup-node@v4
 | 
					      - uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20
 | 
					          node-version: 20
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: package-lock.json
 | 
				
			||||||
      - run: make deps-frontend deps-backend
 | 
					      - run: make deps-frontend deps-backend
 | 
				
			||||||
      # xgo build
 | 
					      # xgo build
 | 
				
			||||||
      - run: make release
 | 
					      - run: make release
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user