Skip to content

Feature/ha

Feature/ha #680

Workflow file for this run

name: Test and Lint
on:
pull_request:
paths-ignore:
- 'apps/docs/**'
- '*.md'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
branches: [ main, master ]
push:
paths-ignore:
- 'apps/docs/**'
- '*.md'
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
branches: [ main, master ]
tags:
- 'v*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9.0.0
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
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 --frozen-lockfile
- name: Run web lint
working-directory: apps/web
run: pnpm lint
- name: Run web build
working-directory: apps/web
run: pnpm build
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24.3'
- name: Install dependencies
working-directory: apps/server
run: go mod download
- name: Run server tests with coverage
working-directory: apps/server
run: |
pwd
go test -v -coverprofile=coverage.txt ./internal/...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: 0xfurai/peekaping
file: apps/server/coverage.txt