-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from altive/add-melos-command-and-actions
ci/cd: Add melos command and actions
- Loading branch information
Showing
13 changed files
with
327 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @riscait @naipaka |
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,20 @@ | ||
name: Setup Flutter | ||
description: "Setup Flutter" | ||
outputs: | ||
flutter-path: | ||
description: "Flutter SDK path" | ||
value: ${{ steps.install-flutter.outputs.CACHE-PATH }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Parse Flutter version | ||
id: fvm-config | ||
uses: kuhnroyal/flutter-fvm-config-action@v1 | ||
|
||
- name: Install Flutter | ||
id: install-flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ steps.fvm-config.outputs.FLUTTER_VERSION }} | ||
channel: ${{ steps.fvm-config.outputs.FLUTTER_CHANNEL }} | ||
cache: true |
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,8 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
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,5 @@ | ||
documentation: | ||
- "**/*.md" | ||
|
||
test: | ||
- "**/test/**/*" |
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,28 @@ | ||
## 🔗 Issue Link | ||
|
||
closes #0 | ||
|
||
## 🙌 What I did | ||
|
||
<!-- What did you do in this pull request? --> | ||
|
||
## ✍️ What I didn't do | ||
|
||
<!-- What didn't you address in this pull request? If none, you can write "None". --> | ||
|
||
## ✅ Verification | ||
|
||
<!-- Build and launch verification + any necessary operational checks --> | ||
|
||
- [ ] Android | ||
- [ ] iOS | ||
- [ ] macOS | ||
- [ ] Web | ||
|
||
## Screenshots | ||
|
||
<!-- If there are UI changes, attach Before and After screenshots or videos --> | ||
|
||
## Additional Information | ||
|
||
<!-- Any reference information for the reviewer (such as concerns or notes about the implementation) --> |
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,11 @@ | ||
name: Assign author to Pull request | ||
on: | ||
pull_request: | ||
types: [opened] | ||
jobs: | ||
assignAuthor: | ||
name: Assign author to PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Assign author to PR | ||
uses: technote-space/assign-author@v1 |
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,91 @@ | ||
name: code check | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
flutter: ${{ steps.filter.outputs.flutter }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Filter by paths | ||
uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
flutter: | ||
- '**/android/**' | ||
- '**/assets/**' | ||
- '**/dart_defines/**' | ||
- '**/golden_test/**' | ||
- '**/ios/**' | ||
- '**/lib/**' | ||
- '**/test/**' | ||
- '**/web/**' | ||
- '**/analysis_options.yaml' | ||
- '**/melos.yaml' | ||
- '**/pubspec.yaml' | ||
- 'fvm_config.json' | ||
analyze: | ||
needs: check | ||
if: ${{ needs.check.outputs.flutter == 'true' && github.event_name != 'push' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Flutter | ||
id: setup-flutter | ||
uses: ./.github/actions/setup_flutter | ||
|
||
- name: Prepare Melos | ||
run: echo "MELOS_SDK_PATH=${{ steps.setup-flutter.outputs.flutter-path }}" >> "$GITHUB_ENV" | ||
|
||
- name: Install Melos | ||
uses: bluefireteam/melos-action@v2 | ||
|
||
- name: Analyze packages | ||
run: melos run analyze --no-select | ||
|
||
- name: Check for the existence of unformatted files | ||
run: melos run format:ci --no-select | ||
|
||
test: | ||
needs: check | ||
if: needs.check.outputs.flutter == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Flutter | ||
id: setup-flutter | ||
uses: ./.github/actions/setup_flutter | ||
|
||
- name: Prepare Melos | ||
run: echo "MELOS_SDK_PATH=${{ steps.setup-flutter.outputs.flutter-path }}" >> "$GITHUB_ENV" | ||
|
||
- name: Install Melos | ||
uses: bluefireteam/melos-action@v2 | ||
|
||
- name: Run package tests | ||
run: melos run test:ci --no-select | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage/lcov.info |
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,26 @@ | ||
name: Lint GitHub Actions workflows | ||
on: | ||
push: | ||
branches: [main] | ||
paths: ['.github/workflows/**'] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
paths: ['.github/workflows/**'] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download actionlint | ||
id: get_actionlint | ||
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
shell: bash | ||
- name: Check workflow files | ||
run: ${{ steps.get_actionlint.outputs.executable }} -color | ||
shell: bash |
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,16 @@ | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
triage: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v4 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
configuration-path: .github/labeler.yml | ||
sync-labels: true |
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
Oops, something went wrong.