Skip to content
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

Update GitHub Actions major versions #369

Merged
merged 12 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/CI-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:

- name: "Set up JDK 17."
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
Expand All @@ -32,7 +32,7 @@ jobs:
log-accepted-android-sdk-licenses: false

- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

- name: "Upload 'Lint Results' artifact."
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Lint Results'
path: |
Expand All @@ -81,21 +81,21 @@ jobs:

- name: "Upload 'Detekt Results' artifact."
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Detekt Results'
path: |
${{ github.workspace }}/**/build/reports/detekt/detekt.*

- name: "Publish 'Code scanning results / detekt' GitHub Code Scanning analysis."
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: ${{ github.workspace }}/gradle/plugins-inventory/build/reports/detekt/detekt.sarif

- name: "Upload 'Unit Test Results' artifact."
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Unit Test Results'
path: ${{ github.workspace }}/**/build/reports/tests/*/
Expand All @@ -112,7 +112,7 @@ jobs:

- name: "Upload 'APKs' artifact."
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'APKs'
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
steps:

- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Generate icon previews."
working-directory: android/data/src/main/res/raw
run: node icon_preview.js > icon_previews.html

- name: "Upload 'Icon Previews' artifact."
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'Icon Previews'
path: |
Expand All @@ -45,7 +45,7 @@ jobs:
steps:

- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Register problem matchers.
run: echo "::add-matcher::.github/problemMatchers-icons.json"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CI-instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:

./gradlew --no-daemon --stacktrace :android:connectedCheck -Pandroid.testInstrumentationRunnerArguments.notAnnotation=net.twisterrob.android.test.SkipOnCI
./gradlew --no-daemon --stacktrace :android:data:svg:connectedCheck
./gradlew --no-daemon --stacktrace :mergeAndroidReports

strategy:
fail-fast: false
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/svg-instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name-check-results: '🔔 Test: SVG Results {0}'
script: |
./.github/workflows/scripts/adb-shell-create-sdcard-android-dir.sh ${{ matrix.api }}
./gradlew --no-daemon --stacktrace :android:data:svg:connectedCheck -Pandroid.testInstrumentationRunnerArguments.class=net.twisterrob.inventory.android.data.svg.DumpImages
./gradlew --no-daemon --stacktrace :android:data:svg:connectedCheck -Pandroid.testInstrumentationRunnerArguments.class=net.twisterrob.inventory.android.data.svg.DumpImages :mergeAndroidReports

strategy:
fail-fast: false
Expand All @@ -30,7 +30,8 @@ jobs:
- 26
- 27
- 28
- 29
# TODO re-enable once https://github.com/ReactiveCircus/android-emulator-runner/issues/373 is resolved.
#- 29
- 30
- 31
- 32
Expand Down
45 changes: 23 additions & 22 deletions .github/workflows/svg-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,102 +12,103 @@ jobs:
steps:

- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Download 'SVG 21' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 21'
path: 'downloads/SVG 21'

- name: "Download 'SVG 22' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 22'
path: 'downloads/SVG 22'

- name: "Download 'SVG 23' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 23'
path: 'downloads/SVG 23'

- name: "Download 'SVG 24' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 24'
path: 'downloads/SVG 24'

- name: "Download 'SVG 25' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 25'
path: 'downloads/SVG 25'

- name: "Download 'SVG 26' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 26'
path: 'downloads/SVG 26'

- name: "Download 'SVG 27' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 27'
path: 'downloads/SVG 27'

- name: "Download 'SVG 28' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 28'
path: 'downloads/SVG 28'

- name: "Download 'SVG 29' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
with:
name: 'SVG 29'
path: 'downloads/SVG 29'
# TODO re-enable once https://github.com/ReactiveCircus/android-emulator-runner/issues/373 is resolved.
#- name: "Download 'SVG 29' artifact."
# if: success() || failure()
# uses: actions/download-artifact@v4
# with:
# name: 'SVG 29'
# path: 'downloads/SVG 29'

- name: "Download 'SVG 30' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 30'
path: 'downloads/SVG 30'

- name: "Download 'SVG 31' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 31'
path: 'downloads/SVG 31'

- name: "Download 'SVG 32' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 32'
path: 'downloads/SVG 32'

- name: "Download 'SVG 33' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 33'
path: 'downloads/SVG 33'

- name: "Download 'SVG 34' artifact."
if: success() || failure()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'SVG 34'
path: 'downloads/SVG 34'
Expand Down Expand Up @@ -135,7 +136,7 @@ jobs:
run: |
# Get all ZIPs into a folder.
# Glob resolution is done by shell, so can't use quotes, have to escape spaces and parentheses.
cp ${{github.workspace}}/downloads/SVG\ ??/android/data/svg/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected/test\(AVD\)\ -\ */svg_??.zip ./
cp ${{github.workspace}}/downloads/SVG\ ??/android/data/svg/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected/emulator-5554\ -\ */svg_??.zip ./
# At this point we should have svg_??.zip files.

# Unzip all ZIPs into separate folders.
Expand All @@ -144,7 +145,7 @@ jobs:

- name: "Upload 'SVG Report' artifact."
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'SVG Report'
path: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/svg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- 'android/data/svg/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/svg*.yml'

jobs:

Expand Down
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,20 @@ idea {
]
}
}

// TODEL https://issuetracker.google.com/issues/222730176
// This makes sure to pick up all subprojects not just direct children.
// com.android.build.gradle.internal.plugins.ReportingPlugin reads the subprojects in afterEvaluate,
// so this will run at the right time for it to observe evaluated children.
subprojects.forEach { evaluationDependsOn(it.path) } // evaluationDependsOnSubprojects()
// https://developer.android.com/studio/test/command-line#multi-module-reports-instrumented-tests
apply(plugin: "android-reporting")
afterEvaluate {
tasks.named("mergeAndroidReports").configure {
mustRunAfter(dependsOn)
setDependsOn([ ])
doFirst {
resultsDirectories.removeIf { !it.exists() }
}
}
}
7 changes: 4 additions & 3 deletions tools/image_compare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ For example:
* image2.png

To compare the above structure, run this command:
```
```shell
node image_compare compare_foo_bar/foo compare_foo_bar/bar compare_foo_bar/diff
```
and investigate the results in `compare_foo_bar/diff`.

## Setup
```
```shell
npm install
```

## Usage

SVN ignored all `compare_*` files and folders.
GIT ignores all `compare_*` files and folders,
so it's recommended to start by setting up a diff root that way.
4 changes: 2 additions & 2 deletions tools/image_compare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"node": ">=10.0.0"
},
"dependencies": {
"pixelmatch": "^5.1.0",
"pngjs": "^3.4.0"
"pixelmatch": "^5.3.0",
"pngjs": "^7.0.0"
}
}
Loading