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 fd043da
Show file tree
Hide file tree
Showing 4 changed files with 23,753 additions and 6,790 deletions.
44 changes: 31 additions & 13 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// 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]
branches: ['master']
pull_request:
branches: [main]
branches: ['master']

jobs:
bootstrap:
Expand All @@ -17,43 +18,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 fd043da

Please sign in to comment.