-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Add CI configuration * fix: remove environments from github action workflows * fix: add missing license header * feature: Add listener integration tests and make some integration tests more reliable * fix: re-format comments * chore: Update changelog * chore: Enable metal renderer for the iOS example app --------- Co-authored-by: Joonas Kerttula <[email protected]>
- Loading branch information
Showing
21 changed files
with
968 additions
and
113 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,6 +1,51 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
- package-ecosystem: "pub" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: chore(deps) | ||
- package-ecosystem: "pub" | ||
directory: "/example" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: chore(deps) | ||
- package-ecosystem: "gradle" | ||
directory: "/android" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: chore(deps) | ||
- package-ecosystem: "gradle" | ||
directory: "/example/android" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: chore(deps) | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: chore(deps) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Run code analysis | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
flutter-analyze: | ||
timeout-minutes: 45 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
channel: 'stable' | ||
cache: true | ||
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | ||
with: | ||
melos-version: '3.0.1' | ||
- name: 'Run Flutter Analyze' | ||
run: melos run flutter-analyze | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
channel: 'stable' | ||
cache: true | ||
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | ||
with: | ||
melos-version: '3.0.1' | ||
- name: Restore Cache | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
with: | ||
path: /home/linuxbrew/.linuxbrew | ||
key: ${{ runner.os }}-linuxbrew- | ||
- uses: Homebrew/actions/setup-homebrew@master | ||
- name: 'Install swiftformat v0.53' | ||
run: | | ||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 | ||
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/86f85aaa82beba49f8a5aabf3a22508c9249f188/Formula/s/swiftformat.rb | ||
echo 'brew "swiftformat.rb"' > Brewfile | ||
brew bundle | ||
- name: Save Cache | ||
uses: actions/cache/save@v3 | ||
if: endsWith(steps.cache.outputs.cache-matched-key,hashFiles('Brewfile.lock.json')) == false | ||
with: | ||
path: /home/linuxbrew/.linuxbrew | ||
key: ${{ runner.os }}-linuxbrew-${{ hashFiles('Brewfile.lock.json') }} | ||
- name: 'Formatter version' | ||
run: | | ||
swiftformat --version | ||
- name: 'Run format' | ||
if: ${{ success() || failure() }} | ||
run: | | ||
melos run format | ||
- name: 'Validate formatting' | ||
if: ${{ success() || failure() }} | ||
run: | | ||
./.github/workflows/scripts/validate-formatting.sh |
This file contains 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 |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Run test and build | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-dart: | ||
timeout-minutes: 45 | ||
runs-on: | ||
labels: ubuntu-latest-8core | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
channel: 'stable' | ||
cache: true | ||
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | ||
with: | ||
melos-version: '3.0.1' | ||
- name: 'Run flutter test' | ||
run: melos run test:dart | ||
|
||
test-android: | ||
timeout-minutes: 45 | ||
runs-on: | ||
labels: ubuntu-latest-8core | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
flutter-version: '3.16.x' | ||
channel: 'stable' | ||
cache: true | ||
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | ||
with: | ||
melos-version: '3.0.1' | ||
- name: 'Run Android native unit tests' | ||
run: melos run test:android | ||
|
||
test-ios: | ||
timeout-minutes: 45 | ||
runs-on: | ||
labels: macos-latest-xlarge | ||
strategy: | ||
matrix: | ||
working_directory: | ||
['example'] | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: '**/Pods' | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
flutter-version: '3.16.x' | ||
channel: 'stable' | ||
cache: true | ||
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | ||
with: | ||
melos-version: '3.0.1' | ||
- name: Generate necessary files with flutter build | ||
working-directory: ${{ matrix.working_directory }} | ||
run: flutter build ios --config-only | ||
- name: 'Run iOS native unit tests' | ||
run: DEVICE='iPhone 14 Pro' melos run test:ios | ||
|
||
build-android: | ||
needs: [test-dart,test-android,test-ios] | ||
if: contains(github.base_ref, 'main') | ||
timeout-minutes: 45 | ||
runs-on: | ||
labels: ubuntu-latest-8core | ||
env: | ||
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }} | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
channel: 'stable' | ||
cache: true | ||
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | ||
with: | ||
melos-version: '3.0.1' | ||
- name: 'Run build for Android' | ||
run: melos run flutter-build-android | ||
|
||
build-ios: | ||
needs: [test-dart,test-android,test-ios] | ||
if: contains(github.base_ref, 'main') | ||
timeout-minutes: 90 | ||
runs-on: macos-latest-xlarge | ||
env: | ||
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }} | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | ||
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
channel: 'stable' | ||
cache: true | ||
architecture: x64 | ||
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | ||
with: | ||
melos-version: '3.0.1' | ||
- uses: actions/cache@v3 | ||
with: | ||
path: '**/Pods' | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/*.podspec') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
- name: 'Run build for iOS' | ||
run: melos run flutter-build-ios |
Oops, something went wrong.