Skip to content

Actions

Actions #5

name: On PR & Push do code check
on:
push:
branches: [ main ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files:
- 'pubspec.yaml'

Check failure on line 19 in .github/workflows/on-pr-push-code-check.yml

View workflow run for this annotation

GitHub Actions / On PR & Push do code check

Invalid workflow file

The workflow is not valid. .github/workflows/on-pr-push-code-check.yml (Line: 19, Col: 13): A sequence was not expected
- 'tools/add_imports/pubspec.yaml'
- name: Setup dart
if: steps.check_files.outputs.files_exists == 'true'
uses: dart-lang/setup-dart@v1
- name: Get main dependencies
if: steps.check_files.outputs.files_exists == 'true'
run: dart pub get
- name: Get add_imports dependencies
if: steps.check_files.outputs.files_exists == 'true'
run: dart pub get
working-directory: tools/add_imports
- name: Run static code analysis
if: steps.check_files.outputs.files_exists == 'true'
uses: invertase/github-action-dart-analyzer@v1
with:
fatal-infos: true
- name: Dart Code Metrics
if: steps.check_files.outputs.files_exists == 'true'
uses: solid-software/dart-code-metrics-action@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fatal_warnings: true
fatal_style: true
- name: Check formatting
if: steps.check_files.outputs.files_exists == 'true'
run: dart format . --set-exit-if-changed