Skip to content

Commit

Permalink
chore: add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Sep 9, 2024
1 parent 673658c commit 08bf627
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Continuous Integration
on:
workflow_dispatch:
push:

jobs:
run-tests:
name: Run Tests
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install Scoop & AutoHotkey
uses: MinoruSekine/setup-scoop@v4
with:
buckets: extras
apps: autohotkey

- name: Install librime
shell: pwsh
run: |
scoop bucket add siku https://github.com/amorphobia/siku.git
scoop install siku/librime
- name: Tests
shell: pwsh
run: |
autohotkey.exe tests\rime_test_main.ahk 1 | echo
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
*/rime/*.userdb*
*/rime/installation.yaml
*/rime/user.yaml
tests/junit.xml
*/*.dll
*.exe
test.ahk
9 changes: 7 additions & 2 deletions tests/rime_test_main.ahk
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#Include Yunit\Yunit.ahk
#Include Yunit\Window.ahk
#Include Yunit\Stdout.ahk
#Include Yunit\OutputDebug.ahk
#Include Yunit\JUnit.ahk
#Include Yunit\Window.ahk

#Include ..\rime_api.ahk
#Include ..\rime_levers_api.ahk
Expand Down Expand Up @@ -67,4 +69,7 @@ Class RimeApiTests {
}
}

Yunit.Use(YunitStdOut, YunitWindow).Test(RimeApiTests)
if A_Args.Length {
Yunit.Use(YunitStdOut).Test(RimeApiTests)
} else
Yunit.Use(YunitStdOut, YunitOutputDebug, YunitJUnit, YunitWindow).Test(RimeApiTests)

0 comments on commit 08bf627

Please sign in to comment.