Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 62 additions & 4 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ name: Frontend CI

on:
push:
branches: [main, develop]
paths:
- 'frontend/**'
- '.github/workflows/frontend-ci.yml'
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend-ci.yml'

jobs:
test:
name: TypeScript Build + Tests
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -30,17 +33,72 @@ jobs:
working-directory: frontend
run: npm run lint

typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
working-directory: frontend
run: npm ci

- name: Type check
working-directory: frontend
run: npm run type-check

test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
working-directory: frontend
run: npm ci

- name: Test
working-directory: frontend
run: npm test
run: npm test -- --forceExit --ci
env:
CI: true

build:
name: Build
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
working-directory: frontend
run: npm ci

- name: Build
working-directory: frontend
run: npm run build
run: npm run build -- --no-lint
env:
NEXT_PUBLIC_API_URL: http://localhost:3001
NEXT_PUBLIC_STELLAR_NETWORK: testnet
NEXT_TELEMETRY_DISABLED: 1
26 changes: 25 additions & 1 deletion frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

module.exports = nextConfig;
const { withSentryConfig } = require('@sentry/nextjs');

module.exports = withSentryConfig(
nextConfig,
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

// Suppresses source map uploading logs during silencing builds
silent: true,
org: 'boxmeout',
project: 'stella-frontend',
},
{
// For all available options, see:
// https://docs.sentry.io/prerequisites/link-event-to-feedback/

// Hides source maps from public. This is important to protect intellectual property
// and prevent users from seeing raw source code.
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
}
);
Loading
Loading