feat: added ci (#1) #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux Build Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'latest' | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libopencv-dev | |
- name: Set environment variables | |
run: | | |
echo "OPENCV_INCLUDE_DIR=/usr/include/opencv4" >> $GITHUB_ENV | |
echo "OPENCV_LIB_DIR=/usr/lib/x86_64-linux-gnu" >> $GITHUB_ENV | |
- name: Install dependencies and build | |
run: npm install | |
- name: Test | |
run: npm test --if-present |