diff --git a/.github/workflows/pana.yml b/.github/workflows/pana.yml new file mode 100644 index 00000000..95e628aa --- /dev/null +++ b/.github/workflows/pana.yml @@ -0,0 +1,102 @@ +name: pana + +env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + +on: + # pull_request: + # branches: + # - master + # paths-ignore: + # - 'docs/**' + push: + # branches: + # - master + # paths-ignore: + # - 'docs/**' + +jobs: + stream_chat: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: axel-op/dart-package-analyzer@v3 + id: analysis + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + relativePath: packages/stream_chat + - name: Check scores + env: + # NB: "analysis" is the id set above. Replace it with the one you used if different. + TOTAL: ${{ steps.analysis.outputs.total }} + TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} + run: | + PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) + if (( $PERCENTAGE < 90 )) + then + echo Score too low! + exit 1 + fi + stream_chat_persistence: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: axel-op/dart-package-analyzer@v3 + id: analysis + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + relativePath: packages/stream_chat_persistence + - name: Check scores + env: + # NB: "analysis" is the id set above. Replace it with the one you used if different. + TOTAL: ${{ steps.analysis.outputs.total }} + TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} + run: | + PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) + if (( $PERCENTAGE < 90 )) + then + echo Score too low! + exit 1 + fi + stream_chat_flutter_core: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: axel-op/dart-package-analyzer@v3 + id: analysis + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + relativePath: packages/stream_chat_flutter_core + - name: Check scores + env: + # NB: "analysis" is the id set above. Replace it with the one you used if different. + TOTAL: ${{ steps.analysis.outputs.total }} + TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} + run: | + PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) + if (( $PERCENTAGE < 90 )) + then + echo Score too low! + exit 1 + fi + stream_chat_flutter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: axel-op/dart-package-analyzer@v3 + id: analysis + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + relativePath: packages/stream_chat_flutter + - name: Check scores + env: + # NB: "analysis" is the id set above. Replace it with the one you used if different. + TOTAL: ${{ steps.analysis.outputs.total }} + TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} + run: | + PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) + if (( $PERCENTAGE < 90 )) + then + echo Score too low! + exit 1 + fi \ No newline at end of file diff --git a/.github/workflows/stream_flutter_workflow.yml b/.github/workflows/stream_flutter_workflow.yml index 9e898eda..ce6d2c63 100644 --- a/.github/workflows/stream_flutter_workflow.yml +++ b/.github/workflows/stream_flutter_workflow.yml @@ -17,7 +17,7 @@ jobs: timeout-minutes: 15 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: fetch-depth: 0 - name: 'Install Flutter' @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: fetch-depth: 0 - name: 'Install Flutter' @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: fetch-depth: 0 - name: 'Install Flutter' @@ -89,7 +89,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: fetch-depth: 0 - name: 'Install Flutter'