Skip to content

⬆️ Update commitlint monorepo to v19 (major) #3958

⬆️ Update commitlint monorepo to v19 (major)

⬆️ Update commitlint monorepo to v19 (major) #3958

Workflow file for this run

name: Node CI
on: [push, pull_request]
jobs:
####### Print: Prints some context relating to the job to make future debugging easier
print:
name: Print context
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Print context 🎉
env:
GH_REF: ${{ github.ref }}
run: |
echo "GH_REF: ${GH_REF}"
####### Lint
lint:
name: 'Lint'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 14.x
- run: yarn --pure-lockfile
- run: yarn lint
####### Unit tests
unit_tests:
name: 'Unit tests'
runs-on: ubuntu-latest
timeout-minutes: 10
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
strategy:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn --pure-lockfile
- run: yarn build
- run: yarn test
env:
# The hostname used to communicate with the Redis service container
REDIS_HOST: localhost
# The default Redis port
REDIS_PORT: 6379
####### Publish to npm
npm_publish:
name: Publish to npm
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [lint, unit_tests]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.x
registry-url: https://registry.npmjs.org/
- name: yarn publish
env:
IS_ALPHA: ${{ contains(github.ref, 'alpha')}}
IS_BETA: ${{ contains(github.ref, 'beta')}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ ${IS_ALPHA} = true ]; then export NPM_TAG="--tag alpha"; fi
if [ ${IS_BETA} = true ]; then export NPM_TAG="--tag beta"; fi
yarn
yarn publish ${NPM_TAG}