Skip to content

fix: STRF-11934 Move PR Title to env #861

fix: STRF-11934 Move PR Title to env

fix: STRF-11934 Move PR Title to env #861

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Tests
on:
pull_request:
branches: [master, main, release-**]
jobs:
build:
strategy:
matrix:
node: [16.x, 18.x]
os: ['ubuntu-latest', 'windows-2019', 'macos-latest']
env:
TITLE: ${{ github.event.pull_request.title }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
- name: Verify Github PR Title TEST
run: echo '$ {{ env.TITLE }}'
- name: Verify Github PR Title
run: echo $TITLE | npx commitlint
- name: Verify Git Commit Name
run: git log -1 --pretty=format:"%s" | npx commitlint
- name: Lint the code
run: npm run lint
- name: Run tests
run: npm run test-with-coverage