Skip to content

V2

V2 #633

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
nextjs:
name: next test
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.17.0
- uses: pnpm/action-setup@v2
name: Install pnpm
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: pnpm install
run: pnpm i --frozen-lockfile
- name: run gts
run: pnpm lint
- name: build
run: pnpm build
env:
NEXT_PUBLIC_SERVER_API_HOST: 'https://api.staging.oreore.me'
go:
name: go test
runs-on: ubuntu-latest
timeout-minutes: 5
env:
TZ: 'Asia/Tokyo'
STORAGE_URL: 'localhost:4443'
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: start database
run: ./scripts/docker-compose-db.sh up -d
- name: go module download
run: go mod download
- name: install tparse
run: go install github.com/mfridman/tparse@latest
- name: build
run: go build -v ./...
- name: test
run: ./scripts/test.sh -cover -json | tee ./go-test.out | tparse
- name: add job summary
if: always()
run: |
tparse -all -file ./go-test.out -format markdown >> $GITHUB_STEP_SUMMARY
- name: upload coverage to codecov
uses: codecov/codecov-action@v3