-
Notifications
You must be signed in to change notification settings - Fork 21
125 lines (100 loc) · 3.3 KB
/
ci.yaml
File metadata and controls
125 lines (100 loc) · 3.3 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
name: CI
permissions:
id-token: write # id-token is required to for OIDC
on:
push:
branches:
- main
pull_request:
jobs:
test-support:
name: Lint and set up test-support
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: aws-actions/configure-aws-credentials@be2e7ad815e27b890489a89ce2717b0f9e26b56e # v4
with:
role-to-assume: arn:aws:iam::459781239556:role/libmodal-ci-cd-role-62a288d
aws-region: us-east-1
- name: Install uv
uses: astral-sh/setup-uv@22695119d769bdb6f7032ad67b9bca0ef8c4a174 # v5
with:
python-version: "3.13"
- run: |
uv python install
- name: Build submodule client
working-directory: modal-client
env:
VIRTUAL_ENV: .venv
run: |
uv venv
uv pip install -r requirements.dev.txt
uv pip install .
uv pip install "synchronicity[compile]~=0.10.3"
uv run inv protoc
uv run inv type-stubs
- name: Install submodule client
run: uv pip install ./modal-client
- run: |
uv pip install ruff
ruff check test-support/
ruff format --check test-support/
- run: test-support/setup.sh
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
MODAL_ENVIRONMENT: libmodal
MODAL_SYNC_ENTRYPOINT: 1
js:
name: modal-js build, lint, and test
runs-on: ubuntu-latest
needs: test-support
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
node-version: "22"
- run: npm ci
working-directory: ./modal-js
- run: npm run format:check
working-directory: ./modal-js
- run: npm run check
working-directory: ./modal-js
- run: npm run lint
working-directory: ./modal-js
- run: npm run build
working-directory: ./modal-js
- run: npm test
working-directory: ./modal-js
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
MODAL_ENVIRONMENT: libmodal
go:
name: modal-go build, lint, and test
runs-on: ubuntu-latest
needs: test-support
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: "1.24"
cache-dependency-path: modal-go/go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
with:
version: v2.1.5
working-directory: ./modal-go
- run: go test -v -count=1 -parallel=10 ./...
working-directory: ./modal-go
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
MODAL_ENVIRONMENT: libmodal