-
Notifications
You must be signed in to change notification settings - Fork 13
35 lines (30 loc) · 1.35 KB
/
dart_formatting.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Dart Formatting
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
jobs:
check_formatting:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Update APT Repositories
run: sudo apt-get update
- name: Install apt-transport-https
run: sudo apt-get install apt-transport-https
- name: Download and Add Google Linux GPG Public Key
run: wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg
- name: Add Dart Repository
run: echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
- name: Install Dart
run: sudo apt-get update && sudo apt-get install dart=3.4.4
- uses: actions/checkout@v4
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format -l 110 --output=none --set-exit-if-changed .
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-18.04
steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and formatting workflow needs to pass.
run: exit 1