Skip to content

Commit 737a3e8

Browse files
author
Laks Castro
authored
Merge pull request #73 from lakscastro/chore/add-static-analysis-action
Add `static-analysis.yaml` action
2 parents 108f900 + 1ec14f2 commit 737a3e8

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ jobs:
1313
- uses: actions/checkout@v2
1414
- uses: dart-lang/setup-dart@v1
1515

16-
- name: Checkout to release branch
16+
- name: Checkout to target branch
1717
run: |
1818
git fetch
1919
git checkout ${{ github.ref_name }}
2020
21+
- name: Run static dart analysis with fatal infos
22+
run: dart analyze --fatal-infos
23+
2124
- name: Create credentials file
2225
run: echo $PUB_CREDENTIALS > ~/pub-credentials.json
2326
env:
@@ -33,4 +36,3 @@ jobs:
3336

3437
- name: Publish
3538
run: dart pub publish --force
36-
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Perform static code analysis through Dart CLI
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
types: [opened, reopened, review_requested]
6+
branches:
7+
- "release/**"
8+
- "master/**"
9+
push:
10+
branches:
11+
- master
12+
- release
13+
14+
jobs:
15+
static_analysis:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: dart-lang/setup-dart@v1
21+
22+
- name: Checkout to target branch
23+
run: |
24+
git fetch
25+
git checkout ${{ github.ref_name }}
26+
27+
- name: Run static dart analysis with fatal infos
28+
run: dart analyze --fatal-infos

0 commit comments

Comments
 (0)