Skip to content
Merged
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
32 changes: 18 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Production flow

on:
push:
Expand All @@ -9,17 +9,21 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
# Setup key
- run: set -eu
- run: mkdir "$HOME/.ssh"
- run: echo "${{ secrets.ssh_key }}" > "$HOME/.ssh/key"
- run: chmod 600 "$HOME/.ssh/key"
# Build
- run: npm ci
- run: npm run build:production
# Deploy
- run: cd dist && rsync -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" --archive --compress . [email protected]:/home/vlad805/projects/radio/
node-version: '22'
- name: Setup SSH key
run: set -eu && mkdir "$HOME/.ssh" && echo "${{ secrets.ssh_key }}" > "$HOME/.ssh/key" && chmod 600 "$HOME/.ssh/key"
- name: Setup dependencies
run: npm ci
- name: Type check
run: npm run typechecking
- name: Unit test
run: npm run test
- name: Build
run: npm run build:production
- name: Deploy
run: cd dist && rsync -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" --archive --compress . [email protected]:/home/vlad805/projects/radio/
25 changes: 25 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pull request flow

on:
pull_request:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Setup dependencies
run: npm ci
- name: Type check
run: npm run typechecking
- name: Unit test
run: npm run test
- name: Build
run: npm run build:production
7 changes: 2 additions & 5 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { pathsToModuleNameMapper } from 'ts-jest';

import tsconfig from './tsconfig.json' assert { type: 'json' };
import tsconfig from './tsconfig.json' with { type: 'json' };

import { Paths } from './src/build/paths.mjs';

Expand All @@ -18,15 +18,12 @@ export default {
'.ts': [
'ts-jest',
{
// Note: We shouldn't need to include `isolatedModules` here because it's a deprecated config option in TS 5,
// but setting it to `true` fixes the `ESM syntax is not allowed in a CommonJS module when
// 'verbatimModuleSyntax' is enabled` error that we're seeing when running our Jest tests.
isolatedModules: true,
useESM: true,
},
],
},
testMatch: [
'<rootDir>/**/*.test.ts',
],
coverageReporters: ['text'],
};
Loading