Skip to content

Commit 4a12d4d

Browse files
committed
Add CI, build plugin and run unit tests
1 parent 9872cfe commit 4a12d4d

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test-template
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test-template:
9+
runs-on: macos-latest
10+
env:
11+
QS_SOURCE_ROOT: /tmp/git/quicksilver
12+
QS_DONT_TEST: 1
13+
CONFIGURATION: Debug
14+
steps:
15+
- run: |
16+
latest_tag=$(
17+
git ls-remote --tags --refs --sort="-v:refname" https://github.com/quicksilver/quicksilver |
18+
awk -F/ '{ print $NF; exit }'
19+
)
20+
mkdir -p "${QS_SOURCE_ROOT}"
21+
git clone --recurse-submodules --branch="${latest_tag}" --depth=1 https://github.com/quicksilver/Quicksilver.git "${QS_SOURCE_ROOT}"
22+
23+
pushd "${QS_SOURCE_ROOT}/Quicksilver"
24+
./Tools/qsrelease "${CONFIGURATION}"
25+
- uses: actions/checkout@v4
26+
- run: |
27+
python -m pip install --user cookiecutter
28+
29+
template_dir=$PWD
30+
pushd "$(mktemp -d)"
31+
python -m cookiecutter \
32+
--no-input \
33+
"${template_dir}" \
34+
plugin_name=QSMyPlugin \
35+
author="Nathan Henrie" \
36+
description="test plugin for CI"
37+
38+
pushd QSMyPlugin
39+
40+
xcodebuild -scheme QSMyPlugin build
41+
xcodebuild -scheme QSMyPlugin test

0 commit comments

Comments
 (0)