Skip to content

Build

Build #341

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
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 -p 443:443 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
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install g++-9
npm install
- name: Configure Client
run: |
bin/dxlclient.js provisionconfig -u admin -p password test/integration 127.0.0.1 client
cp test/integration/dxlclient.config test/integration/client_config.cfg
cat test/integration/client_config.cfg
- name: Execute CI
run: |
echo Running tests with MQTT
npm run ci
sed -i -e "s/#UseWebSockets=false/UseWebSockets=true/g" test/integration/client_config.cfg
cat test/integration/client_config.cfg
echo Running tests with WebSockets
npm run test