CI #179
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
# At minute 0 past hour 0800 and 2000. | |
- cron: '0 8,20 * * *' | |
jobs: | |
commitlint: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
name: Commitlint | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Commitlint | |
uses: wagoid/commitlint-github-action@v6 | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: [ '18.x', '20.x', '22.x' ] | |
eslint: [ 8 ] | |
name: Node.js ${{ matrix.node }} with ESLint ${{ matrix.eslint }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- name: Install Dependencies | |
run: | | |
npm ci | |
npm install --no-save eslint@${{ matrix.eslint }} | |
env: | |
NODE_ENV: development | |
HUSKY: 0 | |
- name: Unit Tests | |
run: npm run test:unit | |
env: | |
NODE_ENV: production | |
- name: Lockfile Lint Test | |
run: npm run test:lockfile | |
- name: Lint | |
run: npm run test:lint |