-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (39 loc) · 1.17 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Flutter CI
on: pull_request
jobs:
checkout_flutter:
name: Run Flutter Test
runs-on: ubuntu-latest
outputs:
output1: ${{steps.unit_test.outcome}}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/[email protected]
with:
channel: "stable"
- name: Running Flutter Test
id: unit_test
run: flutter test
working-directory: packages/testsweets
continue-on-error: true
comment:
name: Comment Result
runs-on: ubuntu-latest
needs: checkout_flutter
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '⚙ Automated Unit Test Result ⚙\n\n All Tests Passed: ${{ needs.checkout_flutter.outputs.output1 }}'
})
- name: Check on failures
if: needs.checkout_flutter.outputs.output1 == 'failure'
run: exit 1