-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (59 loc) · 1.94 KB
/
Copy pathci.yml
File metadata and controls
65 lines (59 loc) · 1.94 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
name: CI
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Build and tests
runs-on: macos-15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build
run: swift build
- name: Test
run: swift test
- name: Lint formatting
run: swift format lint --strict --recursive Sources Tests Package.swift
- name: Render the UI snapshots
run: |
.build/debug/OpenPromptr --render-ui-snapshots "$RUNNER_TEMP/ui-snapshots"
for f in control-light control-dark settings-light settings-dark; do
test -s "$RUNNER_TEMP/ui-snapshots/$f.png"
done
- name: Check the README platform badge against Package.swift
run: |
v="$(sed -n 's/.*\.macOS(\.v\([0-9]*\)).*/\1/p' Package.swift)"
test -n "$v"
grep -q "Platform-macOS%20${v}%2B" README.md
plugin:
name: Stream Deck plugin
runs-on: macos-15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Node version
run: node --version
- name: Format, static checks and tests
working-directory: Tools/openpromptr-streamdeck
run: npm test
bundle:
name: App bundle
runs-on: macos-15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Generate icon
run: swift Scripts/make-icon.swift
- name: Build bundle
# Without a certificate in the runner, ad-hoc signing is used; this is
# enough to check the bundle structure and Info.plist.
run: ./build-app.sh
- name: Check bundle
run: |
test -x "dist/OpenPromptr.app/Contents/MacOS/OpenPromptr"
test -f "dist/OpenPromptr.app/Contents/Resources/AppIcon.icns"