Skip to content

Commit 3b1ff0f

Browse files
committed
init relay service
1 parent 38e3868 commit 3b1ff0f

28 files changed

Lines changed: 599 additions & 969 deletions
Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,52 @@
1-
name: Apps / Pty Proxy
1+
name: Apps / Relay
22

33
on:
44
pull_request:
55
branches: ["*"]
66
paths:
7-
- apps/pty-proxy/**
8-
- packages/db/**
9-
- packages/logger/**
10-
- packages/job-dispatch/**
11-
- packages/auth/**
12-
- packages/validators/**
13-
- .github/workflows/apps-pty-proxy.yaml
14-
- pnpm-lock.yaml
7+
- apps/relay/**
8+
- .github/workflows/apps-relay.yaml
159
push:
1610
branches: ["main"]
1711
paths:
18-
- apps/pty-proxy/**
19-
- packages/db/**
20-
- packages/logger/**
21-
- packages/job-dispatch/**
22-
- packages/validators/**
23-
- packages/auth/**
24-
- .github/workflows/apps-pty-proxy.yaml
25-
- pnpm-lock.yaml
12+
- apps/relay/**
13+
- .github/workflows/apps-relay.yaml
2614

2715
jobs:
16+
tests:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
defaults:
22+
run:
23+
working-directory: apps/relay
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
29+
- name: Set up Go
30+
uses: actions/setup-go@v4
31+
with:
32+
go-version: "1.25"
33+
34+
- name: Cache Go modules
35+
uses: actions/cache@v3
36+
with:
37+
path: |
38+
~/.cache/go-build
39+
~/go/pkg/mod
40+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
41+
restore-keys: |
42+
${{ runner.os }}-go-
43+
44+
- name: Install dependencies
45+
run: go mod download
46+
47+
- name: Run tests with coverage
48+
run: go test -race ./...
49+
2850
build:
2951
runs-on: ubuntu-latest
3052

@@ -36,6 +58,10 @@ jobs:
3658
matrix:
3759
platform: [linux/amd64]
3860

61+
defaults:
62+
run:
63+
working-directory: apps/relay
64+
3965
steps:
4066
- uses: actions/checkout@v4
4167

@@ -64,24 +90,26 @@ jobs:
6490
id: meta
6591
uses: docker/metadata-action@v4
6692
with:
67-
images: ctrlplane/pty-proxy
93+
images: ctrlplane/relay
6894
tags: |
6995
type=sha,format=short,prefix=
7096
7197
- name: Build
7298
uses: docker/build-push-action@v6
7399
if: github.ref != 'refs/heads/main'
74100
with:
101+
context: apps/relay
75102
push: false
76-
file: apps/pty-proxy/Dockerfile
103+
file: apps/relay/Dockerfile
77104
platforms: ${{ matrix.platform }}
78105
tags: ${{ steps.meta.outputs.tags }}
79106

80107
- name: Build and Push
81108
uses: docker/build-push-action@v6
82109
if: github.ref == 'refs/heads/main' && env.DOCKERHUB_LOGIN == 'true'
83110
with:
111+
context: apps/relay
84112
push: true
85-
file: apps/pty-proxy/Dockerfile
113+
file: apps/relay/Dockerfile
86114
platforms: ${{ matrix.platform }}
87115
tags: ${{ steps.meta.outputs.tags }}

apps/pty-proxy/Dockerfile

Lines changed: 0 additions & 52 deletions
This file was deleted.

apps/pty-proxy/README.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

apps/pty-proxy/eslint.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/pty-proxy/package.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

apps/pty-proxy/src/auth.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

apps/pty-proxy/src/config.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)