Add CI/CD with github actions #5
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
on: | |
pull_request: | |
types: [ opened, reopened, synchronize, ready_for_review ] | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to run tests on' | |
required: true | |
default: 'main' | |
name: PR CI/CD | |
# cancel already running jobs for same PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
statuses: write | |
checks: write | |
contents: write | |
pull-requests: write | |
actions: write | |
jobs: | |
analyze: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get | |
- run: flutter analyze --fatal-infos |