Skip to content

Commit

Permalink
build: update github actions versions, lighthouse and related depende…
Browse files Browse the repository at this point in the history
…ncies
  • Loading branch information
Ivelin Ivanov authored Aug 9, 2021
2 parents ad3e689 + 13b78e3 commit 6041779
Show file tree
Hide file tree
Showing 38 changed files with 2,482 additions and 42,286 deletions.
4 changes: 3 additions & 1 deletion .github/lighthouse/lighthouserc-netlify-preview.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"font-display": "off",
"unused-css-rules": "off",
"uses-rel-preconnect": "off",
"is-crawlable": "off"
"is-crawlable": "off",
"csp-xss": ["warn", { "minScore": 0 }],
"unused-javascript": ["warn", { "maxLength": 3 }]
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion .github/lighthouse/lighthouserc-netlify-prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"first-contentful-paint": ["warn", { "minScore": 0.6 }],
"font-display": "off",
"unused-css-rules": "off",
"uses-rel-preconnect": "off"
"uses-rel-preconnect": "off",
"csp-xss": ["warn", { "minScore": 0 }],
"unused-javascript": ["warn", { "maxLength": 3 }]
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Wait for Netlify preview deployment of this git branch
uses: jakepartusch/wait-for-netlify-action@v1
id: get-netlify-url
with:
site_name: "ambianic-pwa-dist"
max_timeout: 180
- name: Run Lighthouse PWA check against Netlify PR Preview
uses: treosh/lighthouse-ci-action@v2
uses: treosh/lighthouse-ci-action@v8
with:
urls: |
${{ steps.get-netlify-url.outputs.url }}
Expand All @@ -32,7 +32,7 @@ jobs:
# budgetPath: '.github/lighthouse/budget.json' # performance budgets
configPath: '.github/lighthouse/lighthouserc-netlify-preview.json' # PWA checks
- name: Run Lighthouse PWA sanity check against Netlify production deployment
uses: treosh/lighthouse-ci-action@v2
uses: treosh/lighthouse-ci-action@v8
with:
urls: |
https://ui.ambianic.ai
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [12.x]
node-version: [16.x]
steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
name: cypress-screenshots
path: cypress/screenshots
- name: Code Coverage Report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
file: |
Expand All @@ -72,7 +72,7 @@ jobs:
CI: true

- name: Run Lighthouse PWA check against local production build
uses: treosh/lighthouse-ci-action@v2
uses: treosh/lighthouse-ci-action@v8
with:
# no urls needed, since it uses local folder to scan .html files
# budgetPath: '.github/lighthouse/budget.json' # performance budgets
Expand Down
12 changes: 9 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ image:
tasks:
- init: |
npm install
npm update
npm audit fix
npm install -g @vue/cli
command: |
echo "Starting Ambianic UI in dev mode:"
npm run serve
Expand All @@ -13,10 +16,13 @@ tasks:
echo "Starting Ambianic PWA testsuite"
npm install cypress
npm run test
- command: |
echo "Starting http server for local HTML file preview"
npx browser-sync start -s -w
vscode:
extensions:
- [email protected]:QHyAEoimIBiRDoL6WtEoRg==
# vscode:
# extensions:
# - [email protected]:QHyAEoimIBiRDoL6WtEoRg==

ports:
- port: 8080
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ See the [Quick Start](https://docs.ambianic.ai/users/quickstart/) guide for inst

Example screenshots on mobile and desktop:

<img src="public/img/ambianic-ui-mobile-screenshot.png" width="300">
<img src="docs/img/ambianic-ui-mobile-screenshot.png" width="300" alt="ambianic UI mobile page example">

&nbsp;

<img src="public/img/ambianic-ui-dekstop-screenshot.png" width="600">
<img src="docs/img/ambianic-ui-dekstop-screenshot.png" width="600" alt="ambianic UI mobile page example">

## Cloud deploymeny

Expand Down Expand Up @@ -92,7 +92,3 @@ If you have questions, ideas or cool projects you'd like to share with the Ambia
## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fambianic%2Fambianic-ui.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fambianic%2Fambianic-ui?ref=badge_large)

&nbsp;
<a href="https://landscape.lfai.foundation/format=card-mode&selected=ambianic">
<img src="https://raw.githubusercontent.com/lfai/artwork/master/lfai-membership-badge/associate/lfai-memberlogos_associate-color.png" width="200" style="display:inline;vertical-align:middle;padding:2%">
</a>
2 changes: 1 addition & 1 deletion cypress/integration/ambianic-tests/about.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ context('AboutPage', () => {

it('Loads title and subtitle', () => {
cy.get('#about-title > .v-list-item__content > .v-list-item__title')
.should('contain.text', 'Safe Home')
.should('contain.text', 'Safer Home')

cy.get('#about-title > .v-list-item__content > .v-list-item__subtitle')
.should('contain.text', 'via Ambient Intelligence')
Expand Down
6 changes: 3 additions & 3 deletions cypress/integration/ambianic-tests/actions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ context('Actions', () => {

it('looks inside welcome message', () => {
cy.get('#welcome-text')
.should('contain', "Let's setup your system" )
.should('contain', 'Safer Home via Ambient Intelligence' )
})

it('looks at welcome button', () => {
let btn = cy.get('#btn-timeline')
const btn = cy.get('#btn-setup')
btn.get('.v-btn__content')
.contains('Continue Setup', { matchCase: false })
.contains('Begin Setup', { matchCase: false })
})
})
13 changes: 8 additions & 5 deletions cypress/integration/ambianic-tests/home.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ context('HomePage', () => {

it('Loads title and subtitle', () => {
cy.get('.v-list-item__subtitle')
.should('contain.text', 'Safe Home - via Ambient Intelligence')
.should('contain.text', 'Safer Home via Ambient Intelligence')
})

it('Loads firsttime installation button', () => {
cy.get('#btn-timeline > .v-btn__content')
.should('contain.text', 'Continue Setup')
cy.get('#btn-setup > .v-btn__content')
.should('contain.text', 'Begin Setup')
.click()
.url().should('include', '/onboarding')
})

it('Ensures returning users are taken directly to timeline', () => {
Expand All @@ -25,8 +26,10 @@ context('HomePage', () => {

// reload to use new values for testing
cy.reload()

cy.url().should('include', '/timeline')
cy.get('#btn-dashboard > .v-btn__content')
.should('contain.text', 'View Timeline')
.click()
.url().should('include', '/timeline')
})
})
})
3 changes: 1 addition & 2 deletions cypress/integration/ambianic-tests/navbar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

context('Check Navbar Items', () => {
before(() => {
cy.visit('http://localhost:8080')
cy.get('[data-cy=timeline]').click()
cy.visit('http://localhost:8080/about')
})

it('Should be a download off button', () => {
Expand Down
File renamed without changes
Loading

0 comments on commit 6041779

Please sign in to comment.