chore: add base action code #1
Workflow file for this run
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: Pull Request | |
on: | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.3.0 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install | |
- name: Lint | |
run: npm run lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install | |
- name: Lint | |
run: npm run test | |
commit_lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
token: '${{ secrets.ACCESS_TOKEN }}' | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4.7.0 | |
with: | |
python-version: 3.11 | |
- name: Install Commitizen | |
run: pip install -U commitizen | |
- name: Check commits | |
run: cz check --rev-range origin/main..HEAD |