Skip to content

build(deps): bump semver from 7.3.5 to 7.5.2 (#63) #121

build(deps): bump semver from 7.3.5 to 7.5.2 (#63)

build(deps): bump semver from 7.3.5 to 7.5.2 (#63) #121

Workflow file for this run

name: CI/CD
on:
push:
branches: [ master, next ]
pull_request:
branches: [ master, next ]
jobs:
lint:
name: Code Quality
runs-on: ubuntu-latest
env:
node-version: 16.x
steps:
- name: git checkout HEAD
uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-fund --no-audit
- name: Lint
run: npm run lint
lint-scripts:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- name: git checkout HEAD
uses: actions/checkout@v2
- name: Install ShellCheck
run: sudo apt update && sudo apt install shellcheck
- name: simulate husky install
# husky does not install when in CI env
# but file is needed so shellcheck does not throw errors for missing file
run: mkdir -p .husky/_ && touch .husky/_/husky.sh
- name: Shellcheck
run: shellcheck -x
.devcontainer/*.sh
.husky/commit-msg
.husky/hook-utils.sh
.husky/post-checkout
.husky/post-merge
.husky/post-rewrite
.husky/pre-commit
.husky/pre-push
.husky/prepare-commit-msg
# - name: shell format
# run: shfmt
lint-commits:
name: Semantic commits
runs-on: ubuntu-latest
env:
node-version: 16.x
steps:
- name: git checkout HEAD
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-fund --no-audit
- name: Commits lint check
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
env:
BASE_COMMIT_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
NEWEST_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
run: npx commitlint --verbose
--from "$BASE_COMMIT_SHA"
--to "$NEWEST_COMMIT_SHA"
build:
name: Build
runs-on: ubuntu-latest
env:
node-version: 16.x
steps:
- name: git checkout HEAD
uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-fund --no-audit
- name: Run build
run: npm run build --if-present
- name: Run unit-tests
run: npm run test:unit
- name: Upload bundle
uses: actions/[email protected]
with:
name: dist-bundle
path: dist/*
if-no-files-found: error
retention-days: 1
integration:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- name: git checkout HEAD
uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: Download bundle
uses: actions/download-artifact@v2
with:
name: dist-bundle
path: dist/
- name: Install dependencies
run: npm ci --prefer-offline --no-fund --no-audit
- name: Run plugin tests
run: npm run test:plugin
release:
needs:
- lint
- lint-commits
- integration
runs-on: ubuntu-latest
steps:
- name: git checkout HEAD
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-fund --no-audit
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}