Skip to content

Commit

Permalink
CI: add test for node 12 through 20
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Nov 20, 2023
1 parent acc7f50 commit 23424f1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,50 @@ jobs:
- name: Test with pytest
run: |
python -m pytest
node-tests:
name: Node ${{ matrix.node-version }} test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
node-version: ['12', '14', '16', '18', '20']
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install future lxml
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install mavlink message
run: |
git clone https://github.com/ArduPilot/mavlink.git
ln -s $PWD/mavlink/message_definitions ../
- name: Install js dependencies
run: |
cd "generator/javascript"
npm ci
echo $PWD
git remote -v
git status
npm list || true
- name : Test mavlink
run: |
./test_gen_js.sh
echo "changing directory" || true
cd generators/javascript
echo "running npm list" || true
npm list
echo "running npm ci" || true
npm ci
echo "running npm test" || true
npm test
2 changes: 1 addition & 1 deletion test_gen_js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ test -z "$MDEF" && MDEF="../message_definitions"
# need to install the bindings first to test them?
printf "${RED}Installing just-generated npm package...${NC}\n\n"
cd generator/javascript
npm install 2>/dev/null > /dev/null
npm ci 2>/dev/null > /dev/null
cd ../..

printf "${RED}JS-NextGen PRETEST setup done.${NC}\n\n"
Expand Down

0 comments on commit 23424f1

Please sign in to comment.