next-enterprise/.github/workflows/ci.yml
2024-08-08 02:57:25 +08:00

46 lines
750 B
YAML

ame: 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/