Skip to content

Release v6.0.1

Release v6.0.1 #199

Workflow file for this run

# PR's only
name: Validate
on:
pull_request:
branches: [master]
env:
FORCE_COLOR: 1
jobs:
linuxNode14:
name: '[Linux] Node.js v14: Lint, Eventual Commitlint, Eventual Changelog, Formatting & Unit tests'
runs-on: ubuntu-latest
strategy:
matrix:
sls-version: [2, 3]
pipenv-version: ['2022.8.5', '2022.8.13', '2023.7.4', '2023.7.9']
# pipenv 2202.8.13 marks deprecation of pipenv lock --requirements
# https://github.com/pypa/pipenv/blob/30067b458bd7a429f242736b7fde40c9bd4d4f14/CHANGELOG.rst#2022813-2022-08-13
# pipenv 2023.7.9 marks deprecation of pipenv lock --keep-outdated
# https://github.com/pypa/pipenv/blob/30067b458bd7a429f242736b7fde40c9bd4d4f14/CHANGELOG.rst#202379-2023-07-09
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# For commitlint purpose ensure to have complete list of PR commits
# It's loose and imperfect assumption that PR has no more than 30 commits
fetch-depth: 30
- name: Retrieve last master commit (for `git diff` purposes)
run: |
git checkout -b pr
git fetch --prune --depth=30 origin +refs/heads/master:refs/remotes/origin/master
git checkout master
git checkout pr
- name: Retrieve dependencies from cache
id: cacheNpm
uses: actions/cache@v2
with:
path: |
~/.npm
node_modules
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v14-${{ runner.os }}-${{ github.ref }}-
npm-v14-${{ runner.os }}-refs/heads/master-
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Check python version
run: |
python --version
- name: Install setuptools
run: python -m pip install --force setuptools wheel
- name: Install pipenv / poetry
run: python -m pip install pipenv==${{ matrix.pipenv-version }} poetry
- name: Install serverless
run: npm install -g serverless@${{ matrix.sls-version }}
- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
run: |
npm update --no-save
npm update --save-dev --no-save
- name: Validate Prettier formatting
run: npm run prettier-check:updated
- name: Validate ESLint rules
run: npm run lint:updated
- name: Validate commit messages
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
run: npx commitlint -f master
- name: Validate changelog (if new version)
run: |
NEW_VERSION=`git diff -U0 master package.json | grep '"version": "' | tail -n 1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+"` || :
if [ -n "$NEW_VERSION" ];
then
npx dump-release-notes-from-cc-changelog $NEW_VERSION
fi
- name: Unit tests
run: npm test
windowsNode14:
name: '[Windows] Node.js v14: Unit tests'
runs-on: windows-latest
strategy:
matrix:
sls-version: [2, 3]
pipenv-version: ['2022.8.5', '2022.8.13', '2023.7.4', '2023.7.9']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Retrieve dependencies from cache
id: cacheNpm
uses: actions/cache@v2
with:
path: |
~/.npm
node_modules
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v14-${{ runner.os }}-${{ github.ref }}-
npm-v14-${{ runner.os }}-refs/heads/master-
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Check python version
run: |
python --version
- name: Install setuptools
run: python -m pip install --force setuptools wheel
- name: Install pipenv / poetry
run: python -m pip install pipenv==${{ matrix.pipenv-version }} poetry
- name: Install serverless
run: npm install -g serverless@${{ matrix.sls-version }}
- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
run: |
npm update --no-save
npm update --save-dev --no-save
- name: Unit tests
run: npm test