Set up CI #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: CI | |
on: | |
- pull_request | |
- push | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- name: Install dependencies | |
run: make node_modules | |
- name: Run ESLint and Prettier checks | |
run: make --keep-going lint check-format | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- name: Install dependencies | |
run: make node_modules | |
- name: Run tests | |
run: make test | |
build: | |
name: Build | |
needs: | |
- lint | |
- test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- name: Install dependencies | |
run: make node_modules | |
- name: Run build | |
run: make | |
- name: Upload dist artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist |