Skip to content

Quality check

Quality check #37

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Quality check
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Reusable workflow call
workflow_call:
secrets:
CLIENT_ID:
required: true
CLIENT_SECRET:
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
check:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/main/README.md
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
# Verify the use of 'dart format' on each commit
- name: Verify formatting
run: dart format -o none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis
- name: Analyze project source
run: dart analyze --fatal-infos
# Ensure your shell script is executable
- name: Make shell script write_credentials.sh executable
run: chmod +x .github/workflows/write_credentials.sh
# Run bash script in order to provide test credentials
- name: Write down test credentials
run: ./.github/workflows/write_credentials.sh
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: dart test
# The pub.dev site uses the analysis tool pana to calculate pub points.
# This is run automatically on the pub.dev site whenever you publish a new package,
# or a new version of an existing package.
- name: Calculating pub points prior to publishing
run: |
dart pub global activate pana
dart pub global run pana --exit-code-threshold 0 --json