mirror of
				https://hub.gitmirror.com/https://github.com/gradle/actions.git
				synced 2025-10-27 16:09:59 +08:00 
			
		
		
		
	 0e27ea7e6c
			
		
	
	
		0e27ea7e6c
		
			
		
	
	
	
	
		
			
			- Avoid running `npm install` on every execution - Add a separate `install` task that runs `npm clean-install`
		
			
				
	
	
	
		
			2.0 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.0 KiB
		
	
	
	
	
	
	
	
Building
The build script in the project root provides a convenient way to perform many local build tasks:
- ./buildwill lint and compile typescript sources
- ./build allwill lint and compile typescript and run unit tests
- ./build installwill install npm packages followed by lint and compile
- ./build init-scriptswill run the init-script integration tests
- ./build act <act-commands>will run- actafter building local changes (see below)
Using act to run integ-test workflows locally
It's possible to run GitHub Actions workflows locally with https://nektosact.com/. Many of the test workflows from this repository can be run in this way, making it easier to test local changes without pushing to a branch.
This feature is most useful to run a single integ-test-* workflow. Avoid running ci-quick-test or other aggregating workflows unless you want to use your local machine as a heater!
Example running a single workflow:
./build act -W .github/workflows/integ-test-caching-config.yml
Example running a single job:
./build act -W .github/workflows/integ-test-caching-config.yml -j cache-disabled-pre-existing-gradle-home
Known issues:
- integ-test-detect-java-toolchains.ymlfails when running on a- linux/amd64container, since the expected pre-installed JDKs are not present. Should be fixed by #89.
- actis not yet compatible with- actions/upload-artifact@v4(or related toolkit functions)
- Workflows run by actcannot submit to the dependency-submission API, as noGITHUB_TOKENis available by default.
Tips:
- Add the following lines to ~/.actrc:- --container-daemon-socket -: Prevents "error while creating mount source path", and yes that's a solitary dash at the end
- --matrix os:ubuntu-latest: Avoids a lot of logging about unsupported runners being skipped
 
- Runners don't have javainstalled by default, so all workflows that run Gradle require asetup-javastep.