Skip to content

Commit

Permalink
Merge pull request #143 from auth0/first-availability
Browse files Browse the repository at this point in the history
Merge `first-availability` into `main`
  • Loading branch information
stevehobbsdev committed Jul 22, 2022
2 parents 0ff6190 + 91dd560 commit aa2ac6f
Show file tree
Hide file tree
Showing 148 changed files with 5,721 additions and 1,477 deletions.
104 changes: 88 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,60 @@ orbs:
macos: circleci/macos@2
flutter: circleci/flutter@1
codecov: codecov/codecov@3
local-android:
orbs:
android: circleci/android@2
commands:
prepare-config:
description: Prepares the environment configuration files
steps:
- run:
name: Prepare Environment Configuration
command: |
cp .env.example .env
sed -i "s/YOUR_AUTH0_DOMAIN/$AUTH0_DOMAIN/" .env
sed -i "s/YOUR_AUTH0_CLIENT_ID/$AUTH0_CLIENT_ID/" .env
sed -i "s/YOUR_AUTH0_CUSTOM_SCHEME/$AUTH0_CUSTOM_SCHEME/" .env
mv android/app/src/main/res/values/strings.xml.example android/app/src/main/res/values/strings.xml
sed -i "s/YOUR_AUTH0_DOMAIN/$AUTH0_DOMAIN/" android/app/src/main/res/values/strings.xml
mv android/local.properties.ci android/local.properties
working_directory: ./auth0_flutter/example
run-smoke-tests:
description: Runs the Android smoke tests
parameters:
android_simulator:
type: string
steps:
- android/accept-licenses
- android/create-avd:
avd-name: auth0_sample_avd
system-image: << parameters.android_simulator >>
install: true
- android/start-emulator:
avd-name: auth0_sample_avd
no-window: true
restore-gradle-cache-prefix: v1a
post-emulator-launch-assemble-command: ""
post-emulator-wait-steps:
- run:
name: Disable Chrome welcome prompt
command: adb shell 'echo "chrome --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line'
- run:
name: Enable ADB root
command: adb root
- android/run-tests:
max-tries: 1
working-directory: ./auth0_flutter/example/android
parameters:
flutter_version:
type: string
default: 3.0.0
default: 3.0.5
jobs:
test_flutter_package:
docker:
- image: cimg/base:2022.04
- image: cimg/base:current
steps:
- checkout
- flutter/install_sdk_and_pub:
Expand Down Expand Up @@ -51,27 +97,22 @@ jobs:
executor:
name: android/android-machine
resource-class: medium
tag: 2021.10.1
tag: 2022.06.1
steps:
- checkout
- flutter/install_sdk_and_pub:
app-dir: ./auth0_flutter
flutter_version: << pipeline.parameters.flutter_version >>
- android/restore-gradle-cache
- android/restore-build-cache
- local-android/prepare-config
- run:
name: Build Android Example App
command: |
cp .env.example .env
mv android/app/src/main/res/values/strings.xml.example android/app/src/main/res/values/strings.xml
flutter build apk
command: flutter build apk
working_directory: ./auth0_flutter/example
- run:
name: Run Android tests
command: |
mv local.properties.ci local.properties
mv ../.env.example ../.env
gradle clean jacocoTestReportDebug
name: Run Android Unit tests
command: gradle clean jacocoTestReportDebug
working_directory: ./auth0_flutter/example/android
- android/save-gradle-cache
- android/save-build-cache
Expand All @@ -89,6 +130,34 @@ jobs:
file: ./auth0_flutter/example/build/auth0_flutter/reports/jacoco/debug/jacoco.xml
upload_name: Auth0 Flutter Android
flags: auth0_flutter_android
smoke_test_android:
parameters:
android_simulator:
type: string
executor:
name: android/android-machine
resource-class: xlarge
tag: 2022.06.1
steps:
- run:
name: Guard Smoke Tests
command: |
if ! [[ -z "$CIRCLE_PR_NUMBER" ]]; then
circleci-agent step halt
fi
- checkout
- flutter/install_sdk_and_pub:
app-dir: ./auth0_flutter
flutter_version: << pipeline.parameters.flutter_version >>
- local-android/prepare-config
- run:
name: Build Android app
command: flutter build apk
working_directory: ./auth0_flutter/example
- local-android/run-smoke-tests:
android_simulator: << parameters.android_simulator >>
- android/save-gradle-cache:
cache-prefix: v1a
test_ios:
parameters:
ios_simulator:
Expand Down Expand Up @@ -129,22 +198,25 @@ jobs:
- run:
name: Generate iOS test coverage report
command: |
mkdir -p ~/test-results/cobertura
mkdir cobertura
bundle exec slather
working_directory: ./auth0_flutter/example/ios
- store_artifacts:
path: ~/test-results/cobertura
- codecov/upload:
file: ~/test-results/cobertura/cobertura.xml
file: ./auth0_flutter/example/ios/cobertura/cobertura.xml
upload_name: Auth0 Flutter iOS
flags: auth0_flutter_ios
xtra_args: -s ./auth0_flutter/example/ios/cobertura
workflows:
build_and_test:
jobs:
- test_flutter_package
- test_android:
requires:
- test_flutter_package
- smoke_test_android:
android_simulator: system-images;android-29;google_apis;x86
requires:
- test_flutter_package
- test_ios:
ios_simulator: iPhone 13
requires:
Expand Down
78 changes: 78 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug Report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: 🐞 Report a bug
description: Have you found a bug or issue? Create a bug report for this library

body:
- type: markdown
attributes:
value: |
**Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues.
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: The issue can be reproduced in the [auth0_flutter sample app](https://github.com/auth0-samples/auth0-flutter-samples/tree/main/sample) (or N/A).
required: true
- label: I have looked into the [README](https://github.com/auth0/auth0-flutter/tree/main/auth0_flutter#readme) and have not found a suitable solution or answer.
required: true
- label: I have looked into the [API documentation](https://pub.dev/documentation/auth0_flutter/latest/) and have not found a suitable solution or answer.
required: true
- label: I have searched the [issues](https://github.com/auth0/auth0-flutter/issues) and have not found a suitable solution or answer.
required: true
- label: I have searched the [Auth0 Community](https://community.auth0.com/c/sdks/5) forums and have not found a suitable solution or answer.
required: true
- label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
required: true

- type: textarea
id: description
attributes:
label: Description
description: Provide a clear and concise description of the issue, including what you expected to happen.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Reproduction
description: Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent.
placeholder: |
1. Step 1...
2. Step 2...
3. ...
validations:
required: true

- type: input
id: environment-version
attributes:
label: auth0_flutter version
validations:
required: true

- type: input
id: environment-flutter-version
attributes:
label: Flutter version
validations:
required: true

- type: dropdown
id: environment-platform
attributes:
label: Platform
multiple: true
options:
- Android
- iOS
validations:
required: true

- type: input
id: environment-platform-version
attributes:
label: Platform version(s)
validations:
required: true
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature Request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 🧩 Feature request
description: Suggest an idea or a feature for this library
labels: ["feature request"]

body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I have looked into the [README](https://github.com/auth0/auth0-flutter/tree/main/auth0_flutter#readme) and have not found a suitable solution or answer.
required: true
- label: I have looked into the [API documentation](https://pub.dev/documentation/auth0_flutter/latest/) and have not found a suitable solution or answer.
required: true
- label: I have searched the [issues](https://github.com/auth0/auth0-flutter/issues) and have not found a suitable solution or answer.
required: true
- label: I have searched the [Auth0 Community](https://community.auth0.com/c/sdks/5) forums and have not found a suitable solution or answer.
required: true
- label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
required: true

- type: textarea
id: description
attributes:
label: Describe the problem you'd like to have solved
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when...
validations:
required: true

- type: textarea
id: ideal-solution
attributes:
label: Describe the ideal solution
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives-and-workarounds
attributes:
label: Alternatives and current workarounds
description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place.
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: πŸ€” Help & Questions
url: https://community.auth0.com/c/sdks/5
about: Ask general support or usage questions in the Auth0 Community forums
- name: πŸ“‘ FAQ
url: https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/FAQ.md
about: Check some commonly asked questions
- name: πŸš€ Common Tasks
url: https://github.com/auth0/auth0-flutter/tree/main/auth0_flutter#common-tasks
about: Check the Common Tasks section of the README to get up to speed with auth0_flutter
- name: πŸ“– API Documentation
url: https://pub.dev/documentation/auth0_flutter/latest/
about: Check the public API documentation for in-depth overview of all the available features
40 changes: 40 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
❗ For general support or usage questions, use the Auth0 Community forums or raise a support ticket.
By submitting a pull request to this repository, you agree to the terms within the Auth0 Code of Conduct: https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md.
-->

- [ ] All new/changed/fixed functionality is covered by tests (or N/A)
- [ ] I have added documentation for all new/changed functionality (or N/A)

<!--
❗ All the above items are required. Pull requests with an incomplete or missing checklist will be closed.
-->

### πŸ“‹ Changes

<!--
Describe both what is changing and why this is important. Include:
- Types and methods added, deleted, deprecated, or changed
- A summary of usage if this is a new feature or a change to a public API
-->

### πŸ“Ž References

<!--
Add relevant links supporting this change, such as:
- GitHub issue/PR number addressed or fixed
- Auth0 Community post
- StackOverflow answer
- Related pull requests/issues from other repositories
If there are no references, simply delete this section.
-->

### 🎯 Testing

<!--
Describe how this can be tested by reviewers. Be specific about anything not tested and why. Include any manual steps for testing end-to-end, or for testing functionality not covered by unit tests.
-->

0 comments on commit aa2ac6f

Please sign in to comment.