Merge pull request #7105 from microsoft/dependabot/pub/get-started/qu… #12
This file contains hidden or 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: Build and test Dart Get Started sample | |
on: | |
push: | |
branches: | |
- main | |
- regen/clients-** | |
paths: | |
- 'get-started/quickstart/dart/**' | |
- '.github/workflows/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'get-started/quickstart/dart/**' | |
- '.github/workflows/**' | |
jobs: | |
build-quickstart-dart: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
name: 'Static Analysis' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PUB_CACHE }} | |
key: ${{ runner.os }}-pub | |
- name: Install dependencies | |
run: dart pub get | |
working-directory: get-started/quickstart/dart | |
- name: Analyze project source | |
if: always() | |
run: dart analyze --fatal-infos | |
working-directory: get-started/quickstart/dart | |
- name: Compile | |
if: always() | |
run: dart compile exe ./bin/cli.dart | |
working-directory: get-started/quickstart/dart |