-
-
Notifications
You must be signed in to change notification settings - Fork 226
Optimize CI a bit #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Optimize CI a bit #232
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
182460f
Bump actions/checkout to v3
Goooler 4fcf0cc
Bump actions/setup-java to v3
Goooler 5ca32d6
Merge branch 'main' into actions
Goooler b8cdc56
Use gradle/gradle-build-action
Goooler 3f634f9
Add `required` for workflow_dispatch inputs
Goooler 69f4036
Reformat
Goooler 35fd8cb
Add ignore rules
Goooler 5688afb
Cache npm
Goooler ae8d5f1
Rename
Goooler 6c8d948
Remove redundant action
Goooler 992a224
Bump actions/cache to v3
Goooler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,18 @@ on: | |
default: 'default' | ||
arch: | ||
description: 'CPU architecture of the system image - x86, x86_64 or arm64-v8a' | ||
required: false | ||
default: 'x86' | ||
emulator-options: | ||
description: 'command-line options used when launching the emulator' | ||
required: false | ||
default: '-no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim' | ||
emulator-build: | ||
required: false | ||
description: 'build number of a specific version of the emulator binary to use' | ||
channel: | ||
description: 'Channel to download the SDK components from - `stable`, `beta`, `dev`, `canary`' | ||
required: false | ||
default: 'stable' | ||
Comment on lines
17
to
31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
script: | ||
description: 'custom script to run - e.g. `./gradlew connectedCheck`' | ||
|
@@ -38,39 +42,45 @@ jobs: | |
timeout-minutes: 15 | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: build, test and lint | ||
run: | | ||
npm install | ||
npm run build | ||
npm run lint | ||
npm test | ||
- name: Cache Node | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
|
||
- name: Java 15 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 15 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
- name: Npm build, test and lint | ||
run: | | ||
npm install | ||
npm run build | ||
npm run lint | ||
npm test | ||
|
||
- name: run action | ||
uses: ./ | ||
with: | ||
api-level: ${{ github.event.inputs.api-level }} | ||
target: ${{ github.event.inputs.target }} | ||
arch: ${{ github.event.inputs.arch }} | ||
profile: Galaxy Nexus | ||
emulator-options: ${{ github.event.inputs.emulator-options }} | ||
emulator-build: ${{ github.event.inputs.emulator-build }} | ||
channel: ${{ github.event.inputs.channel }} | ||
working-directory: ./test-fixture/ | ||
script: ${{ github.event.inputs.script }} | ||
- name: Java 15 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 15 | ||
|
||
- name: Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Run tests | ||
uses: ./ | ||
with: | ||
api-level: ${{ github.event.inputs.api-level }} | ||
target: ${{ github.event.inputs.target }} | ||
arch: ${{ github.event.inputs.arch }} | ||
profile: Galaxy Nexus | ||
emulator-options: ${{ github.event.inputs.emulator-options }} | ||
emulator-build: ${{ github.event.inputs.emulator-build }} | ||
channel: ${{ github.event.inputs.channel }} | ||
working-directory: ./test-fixture/ | ||
script: ${{ github.event.inputs.script }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,3 +101,6 @@ typings/ | |
# IntelliJ IDEA | ||
.idea | ||
*.iml | ||
local.properties | ||
build | ||
.gradle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/actions/cache/blob/main/examples.md#node---npm