-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (134 loc) · 4.46 KB
/
test-oxcaml-image.yml
File metadata and controls
168 lines (134 loc) · 4.46 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
name: OxCaml Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_run:
workflows: ["Build and Push OxCaml Images"]
types: [completed]
workflow_dispatch:
# Container jobs run as root (required by actions/checkout), so we must
# point opam at the vscode user's opam root and add its bin to PATH.
env:
OPAMROOT: /home/vscode/.opam
jobs:
# ============================================================================
# Test OxCaml switch
# ============================================================================
test-oxcaml:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/oxcaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run OxCaml tests
run: |
./test/test-oxcaml-switch.sh
# ============================================================================
# Test LSP server
# ============================================================================
test-lsp:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/oxcaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run LSP tests
run: |
./test/test-lsp.sh oxcaml
# ============================================================================
# Test dune package management
# ============================================================================
test-dune-pkg:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/oxcaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run dune pkg tests
run: |
./test/test-dune-pkg.sh
# ============================================================================
# Test editor integrations
# ============================================================================
test-vscode:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install devcontainer CLI
run: npm install -g @devcontainers/cli
- name: Validate .devcontainer-oxcaml/devcontainer.json
run: devcontainer read-configuration --workspace-folder . --config .devcontainer-oxcaml/devcontainer.json
- name: Validate .devcontainer-oxcaml-from-scratch/devcontainer.json
run: devcontainer read-configuration --workspace-folder . --config .devcontainer-oxcaml-from-scratch/devcontainer.json
- name: Run VS Code tests
run: |
./test/test-vscode.sh
test-emacs:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/oxcaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run Emacs tests
run: |
./test/test-emacs.sh
test-neovim:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/oxcaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run Neovim tests
run: |
./test/test-neovim.sh
test-claude:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/oxcaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run Claude Code tests
run: |
./test/test-claude.sh
# ============================================================================
# Summary job (for required status checks)
# ============================================================================
test-summary:
runs-on: ubuntu-latest
needs:
- test-oxcaml
- test-lsp
- test-dune-pkg
- test-vscode
- test-emacs
- test-neovim
- test-claude
if: always()
steps:
- name: Check test results
run: |
if [ "${{ needs.test-oxcaml.result }}" != "success" ]; then
echo "test-oxcaml failed"
exit 1
fi
if [ "${{ needs.test-lsp.result }}" != "success" ]; then
echo "test-lsp failed"
exit 1
fi
# Note: Some tests may be expected to have warnings, not failures
echo "All critical tests passed"