-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7057abf
commit 4c2274e
Showing
12 changed files
with
134 additions
and
287 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 |
---|---|---|
|
@@ -11,11 +11,23 @@ jobs: | |
with: | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
ref: ${{ github.head_ref }} | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
cache: true | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
- run: npm i | ||
- run: yes | npx @vercel/ncc build src/main.ts | ||
- name: setup flutter test repos | ||
run: | | ||
cd tests/fail_repo | ||
flutter pub get | ||
cd ../pass_repo | ||
flutter pub get | ||
cd ../.. | ||
- name: run tests | ||
run: npm run test | ||
- name: Check for modified files | ||
id: git-check | ||
run: echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV | ||
|
@@ -25,5 +37,5 @@ jobs: | |
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
git add -A | ||
git commit -m '[automated commit] lint format and import sort' | ||
git commit -m 'ci(automated commit): lint format and import sort' | ||
git push |
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,27 @@ | ||
# flutter-code-quality | ||
|
||
### Making changes | ||
An action that runs on PRs to format and test Flutter repos. | ||
|
||
Use ncc to output, not tsc or others. | ||
`ncc build src/main.ts` | ||
### Usage | ||
|
||
```yml | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
ref: ${{ github.head_ref }} | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
cache: true | ||
- uses: ZebraDevs/flutter-code-quality@main | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
``` |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.