Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme following security changes + bump dependencies #88

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 0 additions & 103 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ If it's a _feature_, list things to check and what's impacted

- [ ] Your branch is based on `master`
- [ ] Your code is unit tested
- [ ] CircleCI builds are green (coverage and lint)
- [ ] Github actions are green
- [ ] Add team "CTI" as "Reviewer" for the PR
- [ ] Name your PR with the convention `fix|feat|impr(<subject>): description`.
56 changes: 56 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: ['master']

jobs:
bootstrap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- uses: actions/cache@v3
with:
path: node_modules
key: aircall-everywhere-node-modules{{ checksum "package.json" }}
- run: npm ci

approve:
runs-on: ubuntu-latest
needs: bootstrap
steps:
- uses: trstringer/manual-approval@v1
with:
secret: ${{ secrets.BOT_CREDENTIALS_GITHUB }}
approvers: litil
minimum-approvals: 1
issue-title: 'Deploying to prod from master'
issue-body: 'Please approve or deny the deployment of the latest version'
exclude-workflow-initiator-as-approver: false

npm-publish:
runs-on: ubuntu-latest
needs: approve
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- uses: actions/cache@v3
with:
path: node_modules
key: aircall-everywhere-node-modules{{ checksum "package.json" }}
- run: npm run build
- run: ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/aircall-everywhere/.npmrc
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Guillaume Lambert"
- run: npm publish
78 changes: 61 additions & 17 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,72 @@
name: Node.js CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
branches: ['master']

jobs:
build:
bootstrap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- uses: actions/cache@v3
with:
path: node_modules
key: aircall-everywhere-node-modules{{ checksum "package.json" }}
- run: npm ci

test:
runs-on: ubuntu-latest
needs: bootstrap
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- uses: actions/cache@v3
with:
path: node_modules
key: aircall-everywhere-node-modules{{ checksum "package.json" }}
- name: Test
run: npm test

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
coverage:
runs-on: ubuntu-latest
needs: test
env:
BOT_CREDENTIALS_GITHUB: ${{ secrets.BOT_CREDENTIALS_GITHUB }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- uses: actions/cache@v3
with:
path: node_modules
key: aircall-everywhere-node-modules{{ checksum "package.json" }}
- run: sudo apt-get install libjq1 jq bc
- run: npm run coverage
- run: export PATH="$PATH:~/.local/bin"
- run: bash ./scripts/post-coverage-to-github.sh $GITHUB_HEAD_REF

build-prod:
runs-on: ubuntu-latest
needs: bootstrap
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- uses: actions/cache@v3
with:
path: node_modules
key: aircall-everywhere-node-modules{{ checksum "package.json" }}
- name: Build
run: npm run build
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ You can remove a listener added by `on` with this method.

## `<iframe>` authorizations

> **Notice Regarding Iframing Authorization:** for *security* purpose, we are now whitelisting domains that are iframing us. If you are a customer, please contact [support](https://support.aircall.io/) in order to whitelist your requested domain(s).<br>
If you are a *partner* creating an integration, you can ask for permission using [email protected].

Please be aware that `aircall-everywhere` will generate an iframe with following `allow` attributes.

```html
Expand Down
2 changes: 1 addition & 1 deletion demo/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ pre {
}

// specific stuff
#installation {
#iframing-authorization {
padding-top: 40px;
}

Expand Down
11 changes: 10 additions & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ <h1>Aircall Everywhere SDK</h1>
</div>

<div class="container">
<h2 id="installation">Installation</h2>
<h2 id="iframing-authorization">Iframing Authorization</h2>

<div class="row">
<p>
For security purposes, we are now whitelisting domains that use Aircall Everywhere SDK. If you are a customer, please contact <a href="https://support.aircall.io/">Aircall Support</a>.<br>
If you are a partner creating an integration, you can ask for permission using [email protected].
</p>
</div>

<h2>Installation</h2>

<div class="row">
<div class="left">
Expand Down
Loading