Skip to content

Commit

Permalink
feat: configure instant notifications via IFTTT (#773)
Browse files Browse the repository at this point in the history
Closes #704 

Signed-off-by: ivelin <[email protected]>
  • Loading branch information
Ivelin Ivanov authored Nov 19, 2021
1 parent d3bfe8e commit caf1f63
Show file tree
Hide file tree
Showing 33 changed files with 23,560 additions and 30,140 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
path: ./coverage
- name: Check if coverage meets minimum threshold
run:
npx nyc check-coverage --lines 84 --functions 77 --branches 63
npx nyc check-coverage --lines 81 --functions 76 --branches 66
- name: Build PWA distribution for production
run: |
npm run build --if-present
Expand All @@ -90,10 +90,36 @@ jobs:
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage

- name: Semantic Release
- name: Semantic Release Dry Run
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/github
@semantic-release/npm
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Semantic release & npm publish
# Runs only on the upstream ambianic master branch.
if: github.repository_owner == 'ambianic' && github.event_name == 'push' && ${{ github.ref == 'refs/heads/master' }}
run: npx semantic-release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/github
@semantic-release/npm
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
10 changes: 3 additions & 7 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM gitpod/workspace-full-vnc

# ref: https://community.gitpod.io/t/gitpod-and-cypress-disagree-on-cache
ENV CYPRESS_CACHE_FOLDER=/workspace/.cypress-cache

USER root
# Install custom tools, runtime, etc.

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


# RUN apt-get update && \
# DEBIAN_FRONTEND=noninteractive apt-get -qq install \
# libgtk2.0-0 libgtk-3-0 libgbm-dev \
# libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb \
# && apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*

USER gitpod
# Apply user-specific settings
# ENV ...
Expand Down
3 changes: 0 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ tasks:
# need to install cypress here because
# it needs system dirs that gitpod deletes on workspace restart
# https://community.gitpod.io/t/gitpod-and-cypress-disagree-on-cache/5535
npm install -g cypress
npm run test
- init: |
echo "Waiting for npm install to complete"
Expand All @@ -36,7 +35,6 @@ tasks:
# gp await-port 8080 && gp preview $(gp url 8080)/index.html
command: |
echo "Starting Cypress in Interactive Mode"
npm install -g cypress
npm run cy:open
- init: |
echo "Waiting for npm install to complete"
Expand All @@ -54,7 +52,6 @@ ports:
- port: 8080 # Ambianic UI App
onOpen: open-browser
- port: 6080 # Cypress Interactive Mode
onOpen: open-browser
- port: 3000 # Static file serve via Browsersync
- port: 3001 # Browsersync dashboard
- port: 8888 # Dependencies chart
Expand Down
6 changes: 3 additions & 3 deletions cypress/integration/ambianic-tests/settings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ context('Settings', () => {
display_name: undefined
}
_fakeConnect(cy, win, { edgeDetails })
cy.get('[data-cy=btn-details]').click()
cy.get('[data-cy=btn-device-config]').click()
.get('[data-cy=list-item-edgeVersion]').should('exist').within(($listItem) => {
// version number should not be available for a non-existant edge device ID
cy.get('[data-cy=title-loader]').should('exist')
Expand All @@ -156,7 +156,7 @@ context('Settings', () => {
display_name: undefined
}
_fakeConnect(cy, win, { edgeDetails })
cy.get('[data-cy=btn-details]').click()
cy.get('[data-cy=btn-device-config]').click()
.get('[data-cy=list-item-edgeVersion]').should('exist')
// version number should not be available for a non-existant edge device ID
.find('[data-cy=title-loader]').should('exist')
Expand All @@ -175,7 +175,7 @@ context('Settings', () => {
display_name: undefined
}
_fakeConnect(cy, win, { edgeDetails })
cy.get('[data-cy=btn-details]').click()
cy.get('[data-cy=btn-device-config]').click()
.get('[data-cy=list-item-edgeVersion]').should('exist').within(($listItem) => {
cy.get('[data-cy=title-text-read-only]')
.should('exist')
Expand Down
Loading

0 comments on commit caf1f63

Please sign in to comment.