Switch to github actions #1
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 Pipeline | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache node_modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: v1-dependencies-${{ hashFiles('package.json', 'yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run tests with coverage | |
run: yarn test | |
- name: Lint code | |
run: yarn lint | |
- name: Build project | |
run: yarn build | |
- name: Save dist folder as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-artifact | |
path: dist/ |