Build #918
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: Build | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
env: | |
HUSKY: 0 | |
jobs: | |
install: | |
name: Install package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: ./.github/actions/setup-node | |
- name: Check package-lock.json | |
run: npm exec --yes package-lock-utd@1.1.3 | |
- name: Install package | |
run: npm ci | |
commitlint: | |
if: github.event_name == 'pull_request' | |
name: CommitLint | |
needs: | |
- install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: ./.github/actions/setup-node | |
# https://commitlint.js.org/guides/ci-setup.html#github-actions | |
- name: Validate PR commits with commitlint | |
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose --color | |
lint: | |
name: Lint code | |
needs: | |
- install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: ./.github/actions/setup-node | |
- name: Run lint | |
run: npm run lint | |
build: | |
name: Build template | |
needs: | |
- install | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: ./.github/actions/setup-node | |
- name: Run build | |
run: npm run build -w @pplancq/react-template |