-
Notifications
You must be signed in to change notification settings - Fork 17
170 lines (162 loc) · 4.39 KB
/
Copy pathtest.freighter.yaml
File metadata and controls
170 lines (162 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Test - Freighter (Python & TypeScript)
on:
pull_request:
paths:
- .github/actions/test-python/**
- .github/actions/test-typescript/**
- .github/workflows/test.freighter.yaml
- alamos/go/**
- alamos/py/**
- alamos/ts/**
- codecov.yaml
- configs/eslint/**
- configs/ts/**
- configs/vite/**
- freighter/go/**
- freighter/integration/**
- freighter/py/**
- freighter/ts/**
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- pyproject.toml
- uv.lock
- uv.toml
- turbo.json
- x/go/**
- x/ts/**
push:
branches:
- main
- rc
paths:
- .github/actions/test-python/**
- .github/actions/test-typescript/**
- .github/workflows/test.freighter.yaml
- alamos/go/**
- alamos/py/**
- alamos/ts/**
- codecov.yaml
- configs/eslint/**
- configs/ts/**
- configs/vite/**
- freighter/go/**
- freighter/integration/**
- freighter/py/**
- freighter/ts/**
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- pyproject.toml
- uv.lock
- uv.toml
- turbo.json
- x/go/**
- x/ts/**
workflow_dispatch:
jobs:
changes:
name: Changes
runs-on: ubuntu-latest
outputs:
integration: ${{ steps.filter.outputs.integration }}
py: ${{ steps.filter.outputs.py }}
ts: ${{ steps.filter.outputs.ts }}
steps:
- name: Checkout Repository
uses: actions/checkout@v7
- name: Diff Changes
uses: dorny/paths-filter@v4
id: filter
with:
base: ${{ github.ref }}
filters: |
server: &server
- .github/workflows/test.freighter.yaml
- alamos/go/**
- freighter/go/**
- freighter/integration/**
- x/go/**
py:
- *server
- .github/actions/test-python/**
- alamos/py/**
- codecov.yaml
- freighter/py/**
- pyproject.toml
- uv.lock
- uv.toml
ts:
- *server
- .github/actions/test-typescript/**
- alamos/ts/**
- codecov.yaml
- configs/eslint/**
- configs/ts/**
- configs/vite/**
- freighter/ts/**
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
- turbo.json
- x/ts/**
server:
needs: changes
if: needs.changes.outputs.py == 'true' || needs.changes.outputs.ts == 'true'
uses: ./.github/workflows/build.docker.yaml
permissions:
packages: write
with:
module: freighter/integration
tag: ghcr.io/synnaxlabs/freighter-go-integration:${{ github.sha }}
py:
name: Test - Python
needs: [changes, server]
if: needs.changes.outputs.py == 'true'
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
services:
integration:
image: ghcr.io/synnaxlabs/freighter-go-integration:${{ github.sha }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
ports:
- 8080:8080
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Test Python
uses: ./.github/actions/test-python
with:
directory: freighter/py
coverage: true
coverage_module: freighter
coverage_flag: freighter-py
ts:
name: Test - TypeScript
needs: [changes, server]
if: needs.changes.outputs.ts == 'true'
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
services:
integration:
image: ghcr.io/synnaxlabs/freighter-go-integration:${{ github.sha }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
ports:
- 8080:8080
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Test TypeScript
uses: ./.github/actions/test-typescript
with:
package: freighter
coverage_flag: freighter-ts
directory: freighter/ts