From 507f41ec5187dedd1ce5b90501f87d594b93dc3d Mon Sep 17 00:00:00 2001 From: Krasimir Gruychev Date: Sat, 23 Nov 2024 02:58:48 +0200 Subject: [PATCH] + GH actions: main workflow - run unit tests * README.md --- .github/workflows/main.yml | 46 ++++++++++++++++++++++++++++++++++++++ README.md | 4 +--- 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..75fbb4f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,46 @@ +name: Unit Tests + +on: + push: + branches: + - dev + paths: + - 'package.json' + - 'deno.json' + - 'jsr.json' + - '**/*.js' + - '**/*.mjs' + - '.github/workflows/**' + + pull_request: + branches: + - main + paths: + - 'package.json' + - 'deno.json' + - 'jsr.json' + - '**/*.js' + - '**/*.mjs' + +env: + HA_EMAIL: ${{secrets.HA_EMAIL}} + HA_PASS: ${{secrets.HA_PASS}} + +jobs: + test: + name: Run Mocha Tests + runs-on: ubuntu-latest + + container: + image: denoland/deno:2.0.0 + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Install Dependencies + run: deno install + + - name: Run Tests + run: deno task test + diff --git a/README.md b/README.md index 5c9f381..1d0ffdf 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,7 @@ node cli control --rgb 90,30,115 # RGB something - ✅ port and optimize [tuya-smartlife-api-node](https://github.com/shellcatt/tuya-smartlife-api-node) - ✅ port unit tests -- ❌ port pipelines - -- ... [**Original Roadmap**](https://github.com/shellcatt/tuya-smartlife-api-node#roadmap) +- ✅ port pipelines ## Credits ![License](https://img.shields.io/badge/license-MIT-73901d)