Skip to content

Commit

Permalink
Merge branch 'main' into kuu/benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiya-kume authored Sep 16, 2023
2 parents cc2c76e + 193e4a1 commit 5dc82bf
Show file tree
Hide file tree
Showing 668 changed files with 13,830 additions and 3,164 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root=true

[*]
charset=utf-8
end_of_line=lf
indent_style=space
insert_final_newline=true

[{*.bash,*.sh,*.zsh}]
indent_size=2
tab_width=2
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @DroidKaigi/ConferenceApp2023Reviewer
/app-ios/ @DroidKaigi/appios
9 changes: 7 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
## Links
-

## Screenshot
## Screenshot (Optional if screenshot test is present or unrelated to UI)
Before | After
:--: | :--:
<img src="" width="300" /> | <img src="" width="300" />
<img src="" width="300" /> | <img src="" width="300" />

## Movie (Optional)
Before | After
:--: | :--:
<video src="" width="300" > | <video src="" width="300" >
17 changes: 15 additions & 2 deletions .github/actions/setup-java/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: 'Setup JDK'
name: "Setup JDK"
description: "setup JDK and gradle caching"

inputs:
java-version:
Expand All @@ -25,6 +26,18 @@ runs:

# Better than caching and/or extensions of actions/setup-java
- name: Setup Gradle
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2.7.0
uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2.7.1
with:
gradle-version: wrapper

- name: set konan cache key
id: konan-cache-key
shell: bash
run: echo "KOTLIN_VERSION=$(grep -oE 'kotlin\s*=\s*"[0-9.]*"' gradle/libs.versions.toml | grep -oE '[0-9.]+')" >> $GITHUB_OUTPUT

- name: cache Konan
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
path: |
~/.konan
key: v1-konan-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ steps.konan-cache-key.outputs.KOTLIN_VERSION }}
28 changes: 28 additions & 0 deletions .github/actions/spm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "cache SPM"
description: "save and restore SPM cache"
runs:
using: "composite"
steps:
- uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
id: cache-spm
with:
path: |
./app-ios/build/DerivedData/SourcePackages
key: v1-spm-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ hashFiles('app-ios/Modules/Package.swift') }}-${{ hashFiles('app-ios/App/DroidKaigi2023/DroidKaigi2023.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}

- if: ${{ steps.cache-spm.outputs.cache-hit != 'true' }}
shell: bash
working-directory: app-ios
run: bundle exec fastlane shared

- if: ${{ steps.cache-spm.outputs.cache-hit != 'true' }}
shell: bash
working-directory: app-ios
run: bundle exec fastlane resolved_package

- if: ${{ steps.cache-spm.outputs.cache-hit != 'true' }}
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
path: |
./app-ios/build/DerivedData/SourcePackages
key: v1-spm-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ hashFiles('app-ios/Modules/Package.swift') }}-${{ hashFiles('app-ios/App/DroidKaigi2023/DroidKaigi2023.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
15 changes: 15 additions & 0 deletions .github/actions/xcode-select/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "select xcode"
description: "select xcode defined at .xcode-version"
runs:
using: "composite"
steps:
- name: read .xcode-version
shell: bash
run: |
echo "XCODE_VERSION=$(grep -oE "\d+(\.\d+)+" .xcode-version | awk -F. '{print $1 ".0"}' | uniq)" >> $GITHUB_ENV
- name: execute xcode-select
shell: bash
run: |
echo "select $XCODE_VERSION"
sudo xcode-select --switch "/Applications/Xcode_$XCODE_VERSION.app"
2 changes: 1 addition & 1 deletion .github/workflows/ActionLint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Run actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.25
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/Analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Analyze

on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: ./.github/actions/setup-java

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Build project
run: ./gradlew :app-android:assemble --stacktrace

- name: Perform analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
12 changes: 5 additions & 7 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main
pull_request:
paths-ignore:
- 'app-ios/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
Expand All @@ -23,15 +26,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: ./.github/actions/setup-java

- name: Build all build type and flavor permutations
uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2
with:
gradle-home-cache-cleanup: true
arguments: assemble --stacktrace
- run: ./gradlew :app-android:assemble --stacktrace
- name: Upload build outputs (APKs)
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/CompareScreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CompareScreenshot

on:
pull_request:
paths-ignore:
- 'app-ios/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
Expand All @@ -20,7 +22,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: ./.github/actions/setup-java

Expand All @@ -31,12 +33,7 @@ jobs:
workflow: UnitTest.yml
branch: main

- name: compare screenshot test
id: compare-screenshot-test
uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2
with:
gradle-home-cache-cleanup: true
arguments: compareRoborazziDebug compareRoborazziDevDebug --stacktrace -Pscreenshot
- run: ./gradlew compareRoborazziDebug compareRoborazziDevDebug --stacktrace -Pscreenshot

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CompareScreenshotComment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
echo "pull_request_number=$(cat NR)" >> "$GITHUB_OUTPUT"
- name: main checkout
id: checkout-main
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: main
- id: switch-companion-branch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/DropStaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: read # for checkout

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
repository: droidkaigi/conference-app-2023
ref: gh-actions
Expand Down
53 changes: 40 additions & 13 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,65 @@ name: Format

on:
pull_request:
paths-ignore:
- 'app-ios/**'

run-name: "Format by ${{ github.actor }}"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

permissions: {}

jobs:
format:
permissions:
contents: read

timeout-minutes: 20

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: ./.github/actions/setup-java

- name: Check spotless
uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2
with:
gradle-home-cache-cleanup: true
arguments: spotlessCheck --stacktrace
- uses: reviewdog/[email protected]

- name: Check lint
uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2
with:
arguments: lintDebug lintDevDebug --stacktrace
# - uses: reviewdog/[email protected]
#
# - name: Check detekt
# id: detekt
# uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2
# with:
# gradle-home-cache-cleanup: true
# arguments: detekt reportMerge --continue
#
# - name: Run report with ReviewDog
# if: steps.detekt.outcome == 'failure'
# env:
# REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: cat ./build/reports/detekt/merge.xml |
# reviewdog -f=checkstyle -name="detekt" -reporter="github-pr-review"
#
# - name: Comment lint check success
# if: steps.detekt.outcome == 'success'
# uses: marocchino/sticky-pull-request-comment@v2
# with:
# header: detekt
# recreate: true
# message: |
# :sparkles: :sparkles: **That's perfect, passed the PR lint check perfectly!** :sparkles: :sparkles:
- id: detekt
run: ./gradlew detekt reportMerge --continue

- name: Run report with ReviewDog
if: steps.detekt.outcome == 'failure'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
< ./build/reports/detekt/merge.xml reviewdog -f=checkstyle -name="detekt" -reporter="github-pr-review"
- run: ./gradlew lintDebug lintDevDebug --stacktrace

- name: Upload lint reports
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: suzuki-shunsuke/renovate-autoclose-action@132d8cd3403bc9d779f70de8b5b03bec761d4be4
- uses: suzuki-shunsuke/renovate-autoclose-action@v0.3.2

# Just for internal testing of renovate configuration.
# You have to set your PAT to secrets.
Expand All @@ -51,9 +51,9 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Self-hosted Renovate
uses: renovatebot/github-action@23a02fe7be9e93f857a953cc8162e57d2c8401ef # v39.0.1
uses: renovatebot/github-action@5e224f3a02c7ce9cadc83f82d65f1b6dd73876c1 # v39.0.3
with:
configurationFile: renovate.json5
token: ${{ secrets.RENOVATE_TEST_TOKEN }} # workflow, repo, read user:email permissions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/StagePullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
repository: droidkaigi/conference-app-2023
ref: gh-actions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/StagePush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
repository: droidkaigi/conference-app-2023
ref: gh-actions
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- main
pull_request:
paths-ignore:
- 'app-ios/**'

run-name: "UnitTest by ${{ github.actor }}"

Expand All @@ -21,7 +23,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: ./.github/actions/setup-java

Expand All @@ -38,17 +40,9 @@ jobs:
name: event-payload
path: ${{ github.event_path }}

- name: Run local tests
uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2
with:
gradle-home-cache-cleanup: true
arguments: testDevDebugUnitTest testDebugUnitTest --stacktrace
- run: ./gradlew testDevDebugUnitTest testDebugUnitTest --stacktrace

- name: Get test coverage
uses: gradle/gradle-build-action@243af859f8ca30903d9d7f7936897ca0358ba691 # v2
with:
gradle-home-cache-cleanup: true
arguments: koverHtmlReportDebug koverHtmlReportDevDebug --stacktrace
- run: ./gradlew koverHtmlReportDevDebug --stacktrace

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/WorkflowHook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
recreate: true
message: >
Hi @${{ github.event.workflow_run.actor.login }}!
Codes seem to be unformatted. To resolve this issue, please run `./gradlew spotlessKotlinApply` and fix the results of ./gradlew lintDebug..
Codes seem to be unformatted. To resolve this issue, please run `./gradlew detekt --auto-correct` and fix the results of ./gradlew lintDebug..
Thank you for your contribution.
Expand Down
Loading

0 comments on commit 5dc82bf

Please sign in to comment.