47 lines
751 B
YAML
47 lines
751 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'feature/*'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [20.x]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
- name: Run Lint
|
|
run: yarn lint
|
|
|
|
- name: Run Tests
|
|
run: yarn test
|
|
|
|
- name: Build project
|
|
run: yarn build
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: build
|
|
path: .next/
|
|
|