-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into deps-and-linting
- Loading branch information
Showing
5 changed files
with
61 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,28 +21,47 @@ jobs: | |
matrix: | ||
node-version: [16, 18] | ||
|
||
services: | ||
mssql: | ||
image: mcr.microsoft.com/mssql/server:2019-latest | ||
ports: | ||
- 1433:1433 | ||
options: >- | ||
--health-cmd "exit 0" | ||
--health-interval 10s | ||
--health-timeout 10s | ||
--health-retries 5 | ||
env: | ||
SA_PASSWORD: "P@ssw0rdP@ssw0rd" | ||
ACCEPT_EULA: "Y" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: config | ||
run: cp .env.dev .env | ||
|
||
- uses: isbang/[email protected] | ||
with: | ||
services: mssql | ||
- name: Wait for SQL Server to be ready | ||
run: | | ||
for i in {1..30}; do | ||
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P P@ssw0rdP@ssw0rd -Q "SELECT 1" && break | ||
sleep 1 | ||
done | ||
# - name: Start MSSQL containers | ||
# working-directory: ./ | ||
# run: docker-compose up -d mssql | ||
- name: Create database | ||
run: | | ||
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P P@ssw0rdP@ssw0rd -Q "CREATE DATABASE testdb" | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
# cache: npm | ||
|
||
- name: npm install and test | ||
- name: npm install | ||
run: | | ||
cp ./test/_config.docker.json ./test/config.json | ||
cp ./test/_config.github.json ./test/config.json | ||
npm install | ||
npm test | ||
- name: npm test | ||
run: npm test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ cp .env.dev .env | |
|
||
```shell | ||
docker compose build --no-cache --pull | ||
docker-compose up -d mssql | ||
docker compose up -d mssql | ||
``` | ||
|
||
```shell | ||
|
@@ -42,13 +42,20 @@ run node-red and mssql use docker | |
|
||
```shell | ||
docker compose build --no-cache | ||
docker-compose up -d | ||
docker compose up -d | ||
``` | ||
|
||
```shell | ||
docker compose exec nodered npm install node-red-contrib-mssql-plus-mssql | ||
docker compose exec nodered npm install [email protected] | ||
docker compose exec nodered npm install /workspace/node-red-contrib-mssql-plus-mssql | ||
docker compose restart nodered | ||
``` | ||
|
||
view node-red container log output | ||
|
||
```shell | ||
docker-compose logs -f node-red | ||
docker compose logs -f node-red | ||
``` | ||
|
||
Open `http://127.0.0.1:1880` | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM nodered/node-red:latest-18 | ||
|
||
WORKDIR /usr/src/node-red | ||
|
||
RUN npm install node-red-contrib-inspector |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"server": "localhost", | ||
"port": 1433, | ||
"username": "sa", | ||
"password": "P@ssw0rdP@ssw0rd", | ||
"database": "testdb", | ||
"encyption": false, | ||
"tdsVersion": "7_4", | ||
"trustServerCertificate": true, | ||
"useUTC": true, | ||
"connectTimeout": 15000, | ||
"requestTimeout": 15000, | ||
"cancelTimeout": 5000 | ||
} |