Skip to content

Commit caf1f63

Browse files
author
Ivelin Ivanov
authored
feat: configure instant notifications via IFTTT (#773)
Closes #704 Signed-off-by: ivelin <[email protected]>
1 parent d3bfe8e commit caf1f63

33 files changed

+23560
-30140
lines changed

.github/workflows/main.yml

+29-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
path: ./coverage
7575
- name: Check if coverage meets minimum threshold
7676
run:
77-
npx nyc check-coverage --lines 84 --functions 77 --branches 63
77+
npx nyc check-coverage --lines 81 --functions 76 --branches 66
7878
- name: Build PWA distribution for production
7979
run: |
8080
npm run build --if-present
@@ -90,10 +90,36 @@ jobs:
9090
uploadArtifacts: true # save results as an action artifacts
9191
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
9292

93-
- name: Semantic Release
93+
- name: Semantic Release Dry Run
94+
uses: cycjimmy/semantic-release-action@v2
95+
with:
96+
extra_plugins: |
97+
@semantic-release/changelog
98+
@semantic-release/git
99+
@semantic-release/exec
100+
@semantic-release/commit-analyzer
101+
@semantic-release/release-notes-generator
102+
@semantic-release/github
103+
@semantic-release/npm
104+
dry_run: true
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
107+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
108+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
109+
110+
- name: Semantic release & npm publish
94111
# Runs only on the upstream ambianic master branch.
95112
if: github.repository_owner == 'ambianic' && github.event_name == 'push' && ${{ github.ref == 'refs/heads/master' }}
96-
run: npx semantic-release
113+
uses: cycjimmy/semantic-release-action@v2
114+
with:
115+
extra_plugins: |
116+
@semantic-release/changelog
117+
@semantic-release/git
118+
@semantic-release/exec
119+
@semantic-release/commit-analyzer
120+
@semantic-release/release-notes-generator
121+
@semantic-release/github
122+
@semantic-release/npm
97123
env:
98124
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
99125
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitpod.Dockerfile

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM gitpod/workspace-full-vnc
22

3+
# ref: https://community.gitpod.io/t/gitpod-and-cypress-disagree-on-cache
4+
ENV CYPRESS_CACHE_FOLDER=/workspace/.cypress-cache
5+
36
USER root
47
# Install custom tools, runtime, etc.
58

@@ -18,13 +21,6 @@ RUN apt-get update \
1821
xvfb \
1922
&& sudo rm -rf /var/lib/apt/lists/* \
2023

21-
22-
# RUN apt-get update && \
23-
# DEBIAN_FRONTEND=noninteractive apt-get -qq install \
24-
# libgtk2.0-0 libgtk-3-0 libgbm-dev \
25-
# libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb \
26-
# && apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*
27-
2824
USER gitpod
2925
# Apply user-specific settings
3026
# ENV ...

.gitpod.yml

-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ tasks:
2727
# need to install cypress here because
2828
# it needs system dirs that gitpod deletes on workspace restart
2929
# https://community.gitpod.io/t/gitpod-and-cypress-disagree-on-cache/5535
30-
npm install -g cypress
3130
npm run test
3231
- init: |
3332
echo "Waiting for npm install to complete"
@@ -36,7 +35,6 @@ tasks:
3635
# gp await-port 8080 && gp preview $(gp url 8080)/index.html
3736
command: |
3837
echo "Starting Cypress in Interactive Mode"
39-
npm install -g cypress
4038
npm run cy:open
4139
- init: |
4240
echo "Waiting for npm install to complete"
@@ -54,7 +52,6 @@ ports:
5452
- port: 8080 # Ambianic UI App
5553
onOpen: open-browser
5654
- port: 6080 # Cypress Interactive Mode
57-
onOpen: open-browser
5855
- port: 3000 # Static file serve via Browsersync
5956
- port: 3001 # Browsersync dashboard
6057
- port: 8888 # Dependencies chart

cypress/integration/ambianic-tests/settings.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ context('Settings', () => {
140140
display_name: undefined
141141
}
142142
_fakeConnect(cy, win, { edgeDetails })
143-
cy.get('[data-cy=btn-details]').click()
143+
cy.get('[data-cy=btn-device-config]').click()
144144
.get('[data-cy=list-item-edgeVersion]').should('exist').within(($listItem) => {
145145
// version number should not be available for a non-existant edge device ID
146146
cy.get('[data-cy=title-loader]').should('exist')
@@ -156,7 +156,7 @@ context('Settings', () => {
156156
display_name: undefined
157157
}
158158
_fakeConnect(cy, win, { edgeDetails })
159-
cy.get('[data-cy=btn-details]').click()
159+
cy.get('[data-cy=btn-device-config]').click()
160160
.get('[data-cy=list-item-edgeVersion]').should('exist')
161161
// version number should not be available for a non-existant edge device ID
162162
.find('[data-cy=title-loader]').should('exist')
@@ -175,7 +175,7 @@ context('Settings', () => {
175175
display_name: undefined
176176
}
177177
_fakeConnect(cy, win, { edgeDetails })
178-
cy.get('[data-cy=btn-details]').click()
178+
cy.get('[data-cy=btn-device-config]').click()
179179
.get('[data-cy=list-item-edgeVersion]').should('exist').within(($listItem) => {
180180
cy.get('[data-cy=title-text-read-only]')
181181
.should('exist')

0 commit comments

Comments
 (0)