Skip to content

Build

Build #293

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x] # Updated Node.js versions
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3 # Updated to latest version
with:
submodules: recursive
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 # Updated to latest version
with:
node-version: ${{ matrix.node-version }}
- name: Install broker
run: |
docker pull opendxl/opendxl-broker
docker run -d -p 8883:8883 -p 8443:8443 opendxl/opendxl-broker
docker ps -a
- name: Install dependencies
run: |
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo -E apt-get update -y --allow-releaseinfo-change
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install g++-9
npm install
- name: Provision client
run: |
./node_modules/.bin/dxlclient provisionconfig -u admin -p password test/nodes 127.0.0.1 client
cp test/nodes/dxlclient.config test/nodes/client_config.cfg
sed -i -e "s/127.0.0.1;127.0.0.1/127.0.0.1/g" -e "/local/d" -e "/docker/d" test/nodes/client_config.cfg
cat test/nodes/client_config.cfg
- name: Execute CI
run: |
npm run ci