Skip to content

chore: Bump @commitlint/cli from 19.2.1 to 19.3.0 #9640

chore: Bump @commitlint/cli from 19.2.1 to 19.3.0

chore: Bump @commitlint/cli from 19.2.1 to 19.3.0 #9640

Workflow file for this run

# This workflow will build and run the test suite
# on all opened and updated (and labeled) PRs where
# at least one file does not match paths-ignore.
name: Build & test
on:
# Build when a PR is opened, updated, labeled, or flagged as ready
pull_request:
types:
- opened
- synchronize
- labeled
- unlabeled
- ready_for_review
- auto_merge_enabled
# Build when PRs are merged into master/main
push:
branches:
- master
- main
# Manual run, no inputs necessary
workflow_dispatch:
env:
# Bring color into the GitHub terminal
FORCE_COLOR: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
# GITHUB_CONTEXT: ${{ toJson(github) }}
jobs:
# Turn this on to debug an action
# debug:
# name: Debug
# runs-on: ubuntu-latest
# steps:
# - name: Debugging context variables
# run: echo "$GITHUB_CONTEXT"
lint:
name: Lint files
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Configures the node version used on GitHub-hosted runners
- name: Configure node version
uses: actions/setup-node@v3
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci --prefer-offline
- name: Lint
id: lint
run: npm run lint
test:
name: Run test suite (Web Test Runner)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Configures the node version used on GitHub-hosted runners
- name: Configure node version
uses: actions/setup-node@v3
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci --prefer-offline
- name: install playwright
run: npx playwright install
- name: Run tests
run: npm test
- name: JUnit Report Action
uses: mikepenz/action-junit-report@v2.8.2
with:
report_paths: test-results/test-results.xml
fail_on_failure: true # fail the actions run if the tests failed
build:
name: Compile project
runs-on: ubuntu-latest
strategy:
matrix:
node:
- '20'
- '21'
if: |
github.event_name == 'workflow_dispatch'
|| github.event_name == 'push'
|| ( github.event_name == 'pull_request'
&& github.event.action == 'labeled'
&& github.event.label.name == 'ready to merge'
)
|| ( github.event_name == 'pull_request'
&& github.event.action != 'labeled'
&& github.event.pull_request.draft == false
&& !contains(github.event.pull_request.labels.*.name, 'blocked')
&& !contains(github.event.pull_request.labels.*.name, 'skip ci')
&& !contains(github.event.pull_request.labels.*.name, 'work in progress')
&& !contains(github.event.pull_request.labels.*.name, 'on hold')
)
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
# Configures the node version used on GitHub-hosted runners
- name: Configure node version
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
run: npm ci --prefer-offline
- name: Build
id: build
run: npm run build
- name: Release Dry Run
id: release-dry
run: npm run prepublishOnly -ws --if-present
# Validate the build to main was successful; open an issue if not
validate:
name: Validate successful build on main
needs:
- lint
- test
- build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Capture pull request number from branch name
if: github.event_name == 'workflow_dispatch'
run: |
echo 'prnumber<<EOF' >> $GITHUB_ENV
curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/${{github.repository}}/pulls?head=${{github.repository_owner}}:${{github.ref}} | jq -r '.[] | .number' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Add a label if tests have passed (PR)
if: |
github.event_name == 'pull_request'
&& needs.test.outcome != 'failure'
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: AT passed
- name: Add a label if tests have passed (dispatch)
if: |
github.event_name == 'workflow_dispatch'
&& needs.test.outcome != 'failure'
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: AT passed
number: ${{ env.prnumber }}
- name: Remove the label if tests failed
if: |
github.event_name == 'pull_request'
&& needs.test.outcome == 'failure'
uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: AT passed
- name: Open issue if build breaks
if: |
github.event_name == 'push'
&& needs.build.outcome == 'failure'
uses: imjohnbo/issue-bot@v3
with:
labels: "fix, priority: high"
pinned: true
project: 2 # The project-number from organization project
column: Prioritized
close-previous: true
title: "❌ Build is failing on main"
body: "It looks like the build is currently failing on the main branch. See failed [action results](https://github.com/patternfly/patternfly-elements/actions/runs/${{ github.run_id }}) for more details."
- name: Open issue if tests fail
if: |
github.event_name == 'push'
&& needs.test.outcome == 'failure'
uses: imjohnbo/issue-bot@v3
with:
labels: "fix, priority: medium"
pinned: true
project: 2 # The project-number from organization project
column: Prioritized
close-previous: true
title: "🧪 Tests are failing on main"
body: "It looks like the build is currently failing on the main branch. See failed [action results](https://github.com/patternfly/patternfly-elements/actions/runs/${{ github.run_id }}) for more details."