LoginSignup
0
1

More than 1 year has passed since last update.

Github Actionsによるflutter用 CIの導入

Posted at

flutter test を実行するGHA workflow

name: flutter_test

on: pull_request

jobs:
  run_flutter_test:

    runs-on: ubuntu-latest

    steps:
      - name: checkout
        uses: actions/checkout@v3

      - name: flutter cache
        uses: subosito/flutter-action@v2
        with:
          flutter-version: "3.3.10"
          channel: "stable"
          cache: true
          cache-key: flutter
          cache-path: ${{ runner.tool_cache }}/flutter

      - name: install Flutter
        uses: subosito/flutter-action@v2
        with:
          flutter-version: "3.3.10"
          channel: "stable"

      - name: run flutter pub get
        run: flutter pub get

      - name: run flutter test
        run: flutter test

flutter analyze を実行するGHA workflow

name: flutter_analyze

on: pull_request

jobs:
  run_flutter_analyze:

    runs-on: ubuntu-latest

    steps:
      - name: checkout
        uses: actions/checkout@v3

      - name: flutter cache
        uses: subosito/flutter-action@v2
        with:
          flutter-version: "3.3.10"
          channel: "stable"
          cache: true
          cache-key: flutter
          cache-path: ${{ runner.tool_cache }}/flutter

      - name: install Flutter
        uses: subosito/flutter-action@v2
        with:
          flutter-version: "3.3.10"
          channel: "stable"

      - name: run flutter pub get
        run: flutter pub get

      - name: run flutter analyze
        run: flutter analyze
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1