commitlint(plugins): fix issue#124 #2285
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
commitlint-plugins-tests: | |
name: Run commitlint-related tests | |
runs-on: ubuntu-22.04 | |
container: | |
image: "ubuntu:22.04" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install required dependencies | |
run: | | |
apt update | |
apt install --yes sudo | |
sudo apt install --yes --no-install-recommends git ca-certificates | |
sudo apt install --yes --no-install-recommends npm curl | |
# need to update nodejs because with ubuntu's default nodejs version we would get this error: | |
# error @jest/[email protected]: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "12.22.9" | |
sudo npm install --global n | |
sudo n lts | |
- name: Print versions | |
run: | | |
git --version | |
node --version | |
npm --version | |
- name: Install yarn | |
run: | | |
npm install --global yarn | |
yarn add --dev jest typescript ts-jest @types/jest | |
- name: Install commitlint | |
run: | | |
npm install conventional-changelog-conventionalcommits | |
npm install commitlint@latest | |
- name: Print versions | |
run: | | |
git --version | |
node --version | |
npm --version | |
npx commitlint --version | |
yarn --version | |
- name: Run tests to validate our plugins | |
run: yarn jest |