Skip to content

Commit

Permalink
Add GitHub Action to execute tests and improve code quality (#69)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bubeck authored Oct 16, 2024
1 parent faa96d2 commit 1e8518a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
pull_request:

jobs:

tests:
strategy:
fail-fast: true
matrix:
node-version: [16, 18, 20, 22]
# Use different OS to have different C compilers:
os-version: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04]
# macos-14-large, macos-14, macos-13-large, macos-13
# macos currently fails with this and similar
# ../../src/lv_i18n.template.c:207:28: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
# const lv_i18n_lang_t * lang = current_lang;

name: "Tests (OS: ${{ matrix.os-version }} Node: ${{ matrix.node-version }})"
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- run: npm i lv_i18n -s
- run: cd test/c ; make test-deps
- run: make test

0 comments on commit 1e8518a

Please sign in to comment.