Skip to content

Commit

Permalink
Merge branch 'master' into fix/PH-8835/update-readme-following-securi…
Browse files Browse the repository at this point in the history
…ty-changes
  • Loading branch information
litil committed Jun 8, 2023
2 parents 53a106e + e0509c0 commit 2f87de3
Show file tree
Hide file tree
Showing 7 changed files with 23,809 additions and 6,895 deletions.
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
44 changes: 30 additions & 14 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// caching: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
# 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: CI
name: Node.js CI

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

jobs:
bootstrap:
Expand All @@ -17,43 +16,60 @@ jobs:
with:
node-version: '18.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- 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

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 coverage
- run:
name: Publish coverage on PR
command: |
export PATH="$PATH:~/.local/bin"
bash ./scripts/post-coverage-to-github.sh $GITHUB_HEAD_REF
- 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
- 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 build
run: npm run build
Loading

0 comments on commit 2f87de3

Please sign in to comment.