mirror of
https://github.com/gradle/actions.git
synced 2025-08-21 17:21:30 +08:00
Update build script and contribution guide
This commit is contained in:
parent
248dd904ed
commit
d0f2f0387e
@ -1,3 +1,11 @@
|
|||||||
|
## Building
|
||||||
|
|
||||||
|
The `build` script in the project root provides a convenient way to perform many local build tasks:
|
||||||
|
1. `./build` will lint and compile typescript sources
|
||||||
|
2. `./build all` will lint and compile typescript and run unit tests
|
||||||
|
3. `./build init-scripts` will run the init-script integration tests
|
||||||
|
4. `./build act <act-commands>` will run `act` after building local changes (see below)
|
||||||
|
|
||||||
## How to merge a Dependabot PR
|
## How to merge a Dependabot PR
|
||||||
|
|
||||||
The "distribution" for a GitHub Action is checked into the repository itself.
|
The "distribution" for a GitHub Action is checked into the repository itself.
|
||||||
@ -22,10 +30,10 @@ 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!
|
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:
|
Example running a single workflow:
|
||||||
`act -W .github/workflows/integ-test-caching-config.yml`
|
`./build act -W .github/workflows/integ-test-caching-config.yml`
|
||||||
|
|
||||||
Example running a single job:
|
Example running a single job:
|
||||||
`act -W .github/workflows/integ-test-caching-config.yml -j cache-disabled-pre-existing-gradle-home`
|
`./build act -W .github/workflows/integ-test-caching-config.yml -j cache-disabled-pre-existing-gradle-home`
|
||||||
|
|
||||||
Known issues:
|
Known issues:
|
||||||
- `integ-test-cache-cleanup.yml` fails because `gradle` is not installed on the runner. Should be fixed by #33.
|
- `integ-test-cache-cleanup.yml` fails because `gradle` is not installed on the runner. Should be fixed by #33.
|
||||||
|
8
build
8
build
@ -1,14 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd sources
|
cd sources
|
||||||
npm install
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
|
npm clean-install
|
||||||
nprm run all
|
nprm run all
|
||||||
;;
|
;;
|
||||||
act)
|
act)
|
||||||
# Build and copy outputs to the dist directory
|
# Build and copy outputs to the dist directory
|
||||||
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
cp -r sources/dist .
|
cp -r sources/dist .
|
||||||
@ -17,7 +18,12 @@ case "$1" in
|
|||||||
# Revert the changes to the dist directory
|
# Revert the changes to the dist directory
|
||||||
git co -- dist
|
git co -- dist
|
||||||
;;
|
;;
|
||||||
|
init-scripts)
|
||||||
|
cd test/init-scripts
|
||||||
|
./gradlew check
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
Loading…
x
Reference in New Issue
Block a user