Skip to content

Support for Part separator symbols added #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/test-typescript-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Test TypeScript

env:
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 10.x

on:
push:
paths:
- ".github/workflows/test-typescript-npm.ya?ml"
- ".github/.?codecov.ya?ml"
- "dev/.?codecov.ya?ml"
- ".?codecov.ya?ml"
- "jest.config.js"
- "package.json"
- "package-lock.json"
- "tsconfig.json"
- "**.js"
- "**.jsx"
- "**.ts"
- "**.tsx"
pull_request:
paths:
- ".github/workflows/test-typescript-npm.ya?ml"
- "jest.config.js"
- "package.json"
- "package-lock.json"
- "tsconfig.json"
- "**.js"
- "**.jsx"
- "**.ts"
- "**.tsx"
schedule:
# Run periodically to catch breakage caused by external changes.
- cron: "0 13 * * WED"
workflow_dispatch:
repository_dispatch:

jobs:
test:
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false

matrix:
operating-system:
- macos-latest
- ubuntu-latest
# The version of node-gyp used by this project (7.1.2) requires an older version of Visual Studio that is not
# available in the latest Windows GitHub Actions runner.
- windows-2019

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run-script test

- name: Send unit test coverage to Codecov
if: runner.os == 'Linux'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: ${{ github.repository == 'arduino/arduino-serial-plotter-webapp' }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Serial Plotter WebApp

[![Test TypeScript status](https://github.com/arduino/arduino-serial-plotter-webapp/actions/workflows/test-typescript-npm.yml/badge.svg)](https://github.com/arduino/arduino-serial-plotter-webapp/actions/workflows/test-typescript-npm.yml)

This is a SPA that receives data points over WebSocket and prints graphs. The purpose is to provide a visual and live representation of data printed to the Serial Port.

The application is designed to be as agnostic as possible regarding how and where it runs. For this reason, it accepts different settings when it's launched in order to configure the look&feel and the connection parameters.
Expand Down Expand Up @@ -162,6 +164,7 @@ These are sent to the middleware to be stored and propagated to other clients.
## Development

- `npm i` to install dependencies
- `npm test` to run automated tests
- `npm start` to run the application in development mode @ [http://localhost:3000](http://localhost:3000)

## Deployment
Expand Down
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/en/configuration.html
*/

module.exports = {
collectCoverage: true,
coverageDirectory: "coverage",
coverageReporters: ["lcov"],
preset: "ts-jest",
testEnvironment: "node",
};
77 changes: 62 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test": "jest",
"eject": "react-scripts eject"
},
"files": [
Expand Down Expand Up @@ -49,6 +49,7 @@
"chartjs-plugin-streaming": "^2.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^26.6.0",
"luxon": "^2.1.0",
"node-sass": "^6.0.1",
"prettier": "^2.4.1",
Expand All @@ -60,6 +61,7 @@
"react-scripts": "4.0.3",
"react-select": "^5.1.0",
"react-switch": "^6.0.0",
"ts-jest": "^26.5.6",
"typescript": "^4.4.3",
"web-vitals": "^1.1.2",
"worker-loader": "^3.0.8"
Expand Down
Loading