Skip to content

Commit

Permalink
add github action workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
tkitsunai committed Mar 11, 2024
1 parent fc20774 commit db61db6
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/next-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: next-ci

on:
push:
branches: [main]
pull_request:
branches: [main]

# workflows
jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Lint code
run: pnpm lint

- name: Unit test
run: pnpm test:run

0 comments on commit db61db6

Please sign in to comment.