From 7a992fa18048453d6ea989f4b1610a79301783cc Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 16 Jul 2020 19:29:47 +0200 Subject: [PATCH 1/5] Create update_zhc.yml --- .github/workflows/update_zhc.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/update_zhc.yml diff --git a/.github/workflows/update_zhc.yml b/.github/workflows/update_zhc.yml new file mode 100644 index 00000000..0ac26eea --- /dev/null +++ b/.github/workflows/update_zhc.yml @@ -0,0 +1,21 @@ +name: Update zigbee-herdsman-converters +on: + repository_dispatch: + types: update_zhc + +jobs: + update_zhc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + - uses: actions/setup-node@v2-beta + with: + node-version: 12 + - run: npm install zigbee-herdsman-converters@${{ github.event.client_payload.version }} + - run: rm -rf node_modules npm-shrinkwrap.json && npm install && npm shrinkwrap --dev + - uses: peter-evans/create-pull-request@v2 + with: + commit-message: Update zigbee-herdsman-converters to ${{ github.event.client_payload.version }} + branch: "update_zhc" From 0a69b98dfb61783a42017641c0ed5ee57eb63dc3 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 16 Jul 2020 19:40:58 +0200 Subject: [PATCH 2/5] Update update_zhc.yml --- .github/workflows/update_zhc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update_zhc.yml b/.github/workflows/update_zhc.yml index 0ac26eea..057fe54d 100644 --- a/.github/workflows/update_zhc.yml +++ b/.github/workflows/update_zhc.yml @@ -19,3 +19,4 @@ jobs: with: commit-message: Update zigbee-herdsman-converters to ${{ github.event.client_payload.version }} branch: "update_zhc" + title: Update zigbee-herdsman-converters From 900ae813e9401f58a609a823fd3e0e9cdcfd9c9e Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 16 Jul 2020 20:32:47 +0200 Subject: [PATCH 3/5] Update update_zhc.yml --- .github/workflows/update_zhc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_zhc.yml b/.github/workflows/update_zhc.yml index 057fe54d..03674f3a 100644 --- a/.github/workflows/update_zhc.yml +++ b/.github/workflows/update_zhc.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-node@v2-beta with: node-version: 12 - - run: npm install zigbee-herdsman-converters@${{ github.event.client_payload.version }} + - run: npm install zigbee-herdsman-converters@${{ github.event.client_payload.version }} --save-exact - run: rm -rf node_modules npm-shrinkwrap.json && npm install && npm shrinkwrap --dev - uses: peter-evans/create-pull-request@v2 with: From e6df6c585a69b4ce4b4c327fd0ff75dc521d5c2e Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 16 Jul 2020 20:49:04 +0200 Subject: [PATCH 4/5] Add update_zh.yml --- .github/workflows/update_zh.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/update_zh.yml diff --git a/.github/workflows/update_zh.yml b/.github/workflows/update_zh.yml new file mode 100644 index 00000000..13b06ea5 --- /dev/null +++ b/.github/workflows/update_zh.yml @@ -0,0 +1,22 @@ +name: Update zigbee-herdsman +on: + repository_dispatch: + types: update_zh + +jobs: + update_zh: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + - uses: actions/setup-node@v2-beta + with: + node-version: 12 + - run: npm install zigbee-herdsman@${{ github.event.client_payload.version }} --save-exact + - run: rm -rf node_modules npm-shrinkwrap.json && npm install && npm shrinkwrap --dev + - uses: peter-evans/create-pull-request@v2 + with: + commit-message: Update zigbee-herdsman to ${{ github.event.client_payload.version }} + branch: "update_zh" + title: Update zigbee-herdsman From 9b382595ea2f0085715f6bedacafc0366b0ad356 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 16 Jul 2020 22:16:55 +0200 Subject: [PATCH 5/5] Add ci.yml --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..81507ca4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2-beta + with: + node-version: 12 + - name: Get NodeJS Version + id: nodeversion + run: | + echo "::set-output name=version::$(node --version)" + - name: Restore node_modules cache + id: cache-node-modules + uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.os }}-${{ steps.nodeversion.outputs.version }}-${{ hashFiles('npm-shrinkwrap.json') }} + - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm ci + - name: Test + run: npm run test-with-coverage + - name: Lint + run: npm run eslint \ No newline at end of file