Skip to content

Commit 1e8518a

Browse files
authored
Add GitHub Action to execute tests and improve code quality (#69)
* First version of GitHub Actions for continous test * Fixed syntax error * Test to trigger GH action * on:push: always * Make "npm i" before test * Correctly install lv_i18n * install unity before running test * Restored example file * Matrix test with different nodejs versions * Fixed node version in matrix * Different C Compilers * Fixed Syntax Terror * Added more OS * Fixed Syntax Terror * Added more node versions * Added macos-14 * Removed macos because of problems
1 parent faa96d2 commit 1e8518a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/ci.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
9+
tests:
10+
strategy:
11+
fail-fast: true
12+
matrix:
13+
node-version: [16, 18, 20, 22]
14+
# Use different OS to have different C compilers:
15+
os-version: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04]
16+
# macos-14-large, macos-14, macos-13-large, macos-13
17+
# macos currently fails with this and similar
18+
# ../../src/lv_i18n.template.c:207:28: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
19+
# const lv_i18n_lang_t * lang = current_lang;
20+
21+
name: "Tests (OS: ${{ matrix.os-version }} Node: ${{ matrix.node-version }})"
22+
runs-on: ${{ matrix.os-version }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
29+
- run: npm i lv_i18n -s
30+
- run: cd test/c ; make test-deps
31+
- run: make test
32+

0 commit comments

Comments
 (0)