Skip to content

Bump docker/build-push-action from 6 to 7 #62

Bump docker/build-push-action from 6 to 7

Bump docker/build-push-action from 6 to 7 #62

Workflow file for this run

name: Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_run:
workflows: ["Build and Push 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 OCaml compiler and tools (matrix: switch × arch)
# ============================================================================
test-ocaml:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
switch: ['5.4.0', '5.4.0+tsan']
runner: [ubuntu-latest]
# Uncomment to add ARM runners:
# runner: [ubuntu-latest, ubuntu-24.04-arm]
container:
image: ghcr.io/${{ github.repository_owner }}/ocaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run OCaml tests
run: |
./test/test-ocaml.sh ${{ matrix.switch }}
# ============================================================================
# Test LSP server (matrix: switch)
# ============================================================================
test-lsp:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
switch: ['5.4.0', '5.4.0+tsan']
container:
image: ghcr.io/${{ github.repository_owner }}/ocaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run LSP tests
run: |
./test/test-lsp.sh ${{ matrix.switch }}
# ============================================================================
# Test profiling tools (matrix: switch)
# ============================================================================
test-profiling:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
switch: ['5.4.0', '5.4.0+tsan']
container:
image: ghcr.io/${{ github.repository_owner }}/ocaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run profiling tests
run: |
./test/test-profiling.sh ${{ matrix.switch }}
# ============================================================================
# Test dune package management
# ============================================================================
test-dune-pkg:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository_owner }}/ocaml-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/devcontainer.json
run: devcontainer read-configuration --workspace-folder .
- name: Validate .devcontainer-from-scratch/devcontainer.json
run: devcontainer read-configuration --workspace-folder . --config .devcontainer-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 }}/ocaml-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 }}/ocaml-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 }}/ocaml-devcontainer:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run Claude Code tests
run: |
./test/test-claude.sh
# ============================================================================
# Functional test: spin up devcontainer and run smoke tests
# ============================================================================
test-devcontainer:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build and run devcontainer
uses: devcontainers/ci@v0.3
with:
runCmd: |
ocaml -version
dune --version
opam switch list
cd examples/hello && dune build && dune exec ./hello.exe
push: never
# ============================================================================
# Summary job (for required status checks)
# ============================================================================
test-summary:
runs-on: ubuntu-latest
needs:
- test-ocaml
- test-lsp
- test-profiling
- test-dune-pkg
- test-vscode
- test-emacs
- test-neovim
- test-claude
- test-devcontainer
if: always()
steps:
- name: Check test results
run: |
if [ "${{ needs.test-ocaml.result }}" != "success" ]; then
echo "test-ocaml failed"
exit 1
fi
if [ "${{ needs.test-lsp.result }}" != "success" ]; then
echo "test-lsp failed"
exit 1
fi
if [ "${{ needs.test-devcontainer.result }}" != "success" ]; then
echo "test-devcontainer failed"
exit 1
fi
# Note: Some tests may be expected to have warnings, not failures
echo "All critical tests passed"