IsolationLevel #24
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: 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, tools/add_imports/pubspec.yaml' | |
- name: Early exit | |
if: steps.check_files.outputs.files_exists == 'false' | |
run: | | |
gh run cancel ${{ github.run_id }} | |
gh run watch ${{ github.run_id }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
# https://github.com/invertase/dart_edge/issues/50 | |
# Tested with 3.0.6, but others should work too | |
sdk: 3.0.0 | |
- name: Get main dependencies | |
run: dart pub get | |
- name: Get add_imports dependencies | |
run: dart pub get | |
working-directory: tools/add_imports | |
- name: Run static code analysis | |
uses: invertase/github-action-dart-analyzer@v1 | |
with: | |
fatal-infos: true | |
- name: Dart Code Metrics | |
# uses: solid-software/dart-code-metrics-action@v5 | |
uses: danylo-safonov-solid/dart-code-metrics-action@758380d191edc7ba5e11eae52b58c55820d225f0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
fatal_warnings: true | |
fatal_style: true | |
flutter_version: 3.10.6 | |
- name: Check formatting | |
run: dart format . --set-exit-if-changed |