-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.04 KB
/
ci.yaml
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
name: ci
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch: {} # support manual runs
permissions:
contents: read
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- run: git config --global core.autocrlf false # For windows
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: stable # TODO: Use a matrix instead to test multiple versions if needed.
- uses: bufbuild/[email protected]
- name: pub get
run: dart pub get
- name: activate melos
run: dart pub global activate melos
- name: all
run: melos run all
- name: Check Diff
# Windows runs powershell, we have to use different commands for that.
run: ${{ startsWith(matrix.os, 'windows') && 'if (-not ([string]::IsNullOrEmpty((git status --porcelain)))) { git diff; exit 1 }' || '[[ -z $(git status --porcelain | tee /dev/stderr) ]] || exit 1' }}