Feat/event-system #99
Workflow file for this run
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
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 |