feat(ng-keyboard-sort)!: update to Angular 19 (#140) #367
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: | |
branches: | |
- main | |
pull_request: | |
env: | |
node_version: 20 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build: | |
name: Build and Run Tests | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Yaml Lint | |
run: | | |
yamllint --strict -f github \ | |
-d '{extends: default, rules: {document-start: disable, line-length: {max: 120}, truthy: disable}}' \ | |
$(git ls-files '*.yaml' '*.yml') | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.node_version }} | |
- name: Get node cache | |
id: get-node-cache | |
run: | | |
sh ./scripts/node-cache.sh >> $GITHUB_OUTPUT | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ env.node_version }}-${{ steps.get-node-cache.outputs.node-cache }} | |
restore-keys: '${{ runner.os }}-node-${{ env.node_version }}-' | |
- name: Install | |
run: npm i | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
- name: Validate commit message | |
if: github.event_name == 'pull_request' | |
run: | | |
set -exo pipefail | |
PR_NUM=${{ github.event.pull_request.number }} | |
PR_COMMIT=$(gh pr view --json commits --jq '.commits[0].messageHeadline' $PR_NUM) | |
PR_TITLE=$(gh pr view --json title --jq '.title' $PR_NUM) | |
if [[ $PR_COMMIT != $PR_TITLE ]]; then | |
echo "❌ PR title and commit message must match" | |
exit 1 | |
fi | |
echo $PR_COMMIT | npx commitlint --strict | |
if [[ $? != 0 ]]; then | |
echo "❌ Commit message validation failed" | |
exit 1 | |
fi | |
echo "✅ Commit message validation passed" | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Prep | |
run: npx playwright install --with-deps webkit | |
- name: Lint | |
run: npm run lint:all | |
- name: Build | |
run: npm run build | |
- name: Test | |
run: node ./scripts/test.js | |
- name: End to End Tests | |
run: npm run e2e |