-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (125 loc) · 4.93 KB
/
Copy pathnative.yml
File metadata and controls
131 lines (125 loc) · 4.93 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Native Apps CI
on:
push:
branches: [main]
paths:
- 'apps/macos/**'
- 'apps/windows/**'
- 'apps/linux/**'
- 'shared/**'
- 'scripts/**'
- '.github/workflows/native.yml'
pull_request:
paths:
- 'apps/macos/**'
- 'apps/windows/**'
- 'apps/linux/**'
- 'shared/**'
- 'scripts/**'
- '.github/workflows/native.yml'
permissions:
contents: read
jobs:
i18n-parity:
name: i18n single-source parity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify platform copies match shared/i18n
run: scripts/sync-i18n.sh --check
macos:
name: macOS (Swift build + tests + CLI golden smoke)
# macos-15 images default to Xcode 16+ (Swift 6); macos-14 ships Swift 5.10.
runs-on: macos-15
needs: i18n-parity
defaults:
run:
working-directory: apps/macos
steps:
- uses: actions/checkout@v4
- name: Swift version
run: swift --version
- name: Build
run: swift build
- name: Unit tests (data contract, date parser, CLI JSON)
run: swift test
- name: CLI end-to-end smoke (contract)
run: |
DB=$(mktemp -d)/tasks.db
B=.build/debug/Taskly
$B mklist "work" --icon "💼" --color "#C15F3C" --db "$DB"
ID=$($B add "buy milk" --due tomorrow --db "$DB" --quiet)
$B update "$ID" --time 09:30 --db "$DB" --json | grep -q '"dueTime": "09:30"'
$B search "milk" --db "$DB" --json | grep -q '"text"'
$B done "$ID" --db "$DB" --json --quiet | grep -q '"completed": true'
$B rm "$ID" --db "$DB" --json | grep -q '"deleted": true'
$B list --view completed --db "$DB" | wc -l | grep -q '^0$' || true
# Negative contract tests: expected-failure commands, so suspend errexit.
set +e
$B update 999 --text x --db "$DB" 2>/dev/null; test $? -eq 3
$B list --view bogus --db "$DB" 2>/dev/null; test $? -eq 2
set -e
linux:
name: Linux (Vala build + contract tests + CLI smoke)
runs-on: ubuntu-latest
needs: i18n-parity
steps:
- uses: actions/checkout@v4
- name: Install Vala + GTK toolchain
run: |
sudo apt-get update
sudo apt-get install -y valac meson libgtk-4-dev libadwaita-1-dev \
libsqlite3-dev libnotify-dev pkg-config
- name: Build (valac → C → native binary)
working-directory: apps/linux
run: |
meson setup build
meson compile -C build
- name: Contract tests (schema/date parser/i18n/CLI JSON)
working-directory: apps/linux
run: meson test -C build --verbose
- name: CLI end-to-end smoke (contract, --db isolation)
working-directory: apps/linux
run: |
DB=$(mktemp -d)/tasks.db
B=build/taskly
$B mklist "work" --icon "💼" --color "#C15F3C" --db "$DB" --json | grep -q '"id": 2'
test -f "$DB"
ID=$($B add "buy milk" --due tomorrow --db "$DB" --quiet)
$B update "$ID" --time 09:30 --db "$DB" --json | grep -q '"dueTime": "09:30"'
$B search "milk" --db "$DB" --json | grep -q '"text"'
$B done "$ID" --db "$DB" --json --quiet | grep -q '"completed": true'
$B rm "$ID" --db "$DB" --json | grep -q '"deleted": true'
# Negative contract tests: expected-failure commands, so suspend errexit.
set +e
$B update 999 --text x --db "$DB" 2>/dev/null; test $? -eq 3
$B list --view bogus --db "$DB" 2>/dev/null; test $? -eq 2
set -e
windows:
name: Windows (WinUI 3 build)
runs-on: windows-latest
needs: i18n-parity
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Build
# WindowsAppSDKSelfContained requires a real architecture (AnyCPU is rejected).
run: dotnet build apps/windows/Taskly/Taskly.csproj -c Release -p:Platform=x64
- name: CLI end-to-end smoke (contract, --db isolation)
shell: bash
run: |
DB=$(mktemp -d)/tasks.db
B=apps/windows/Taskly/bin/x64/Release/net8.0-windows10.0.22621.0/Taskly.exe
"$B" mklist "work" --icon "💼" --color "#C15F3C" --db "$DB" --json | grep -q '"id": 2'
ID=$("$B" add "buy milk" --due tomorrow --db "$DB" --quiet)
"$B" update "$ID" --time 09:30 --db "$DB" --json | grep -q '"dueTime": "09:30"'
"$B" search "milk" --db "$DB" --json | grep -q '"text"'
"$B" done "$ID" --db "$DB" --json --quiet | grep -q '"completed": true'
"$B" rm "$ID" --db "$DB" --json | grep -q '"deleted": true'
# Negative contract tests: expected-failure commands, so suspend errexit.
set +e
"$B" update 999 --text x --db "$DB" 2>/dev/null; test $? -eq 3
"$B" list --view bogus --db "$DB" 2>/dev/null; test $? -eq 2
set -e