-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 1.82 KB
/
Copy pathci.yml
File metadata and controls
72 lines (62 loc) · 1.82 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq jq tmux
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install jq tmux || true
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
choco install jq -y --no-progress
- name: Syntax check
run: |
errors=0
for f in bin/flowai install.sh src/commands/*.sh src/phases/*.sh \
src/core/*.sh src/bootstrap/*.sh src/graph/*.sh src/os/*.sh src/os/lib/*.sh scripts/*.sh; do
if ! bash -n "$f" 2>&1; then
echo "::error file=$f::Syntax error"
errors=$((errors + 1))
fi
done
[[ "$errors" -eq 0 ]] || exit 1
- name: Run tests
run: |
FLOWAI_TEST_ALLOW_MISSING_TMUX=1 bash tests/run.sh
- name: Install (Unix)
if: runner.os != 'Windows'
run: |
sudo bash install.sh
- name: Install (Windows)
if: runner.os == 'Windows'
run: |
NO_SUDO=1 PREFIX="$HOME/.local" bash install.sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Verify commands
run: |
flowai version
flowai --help
fai version