sandbox: dynamic directory mount & snapshot in go + adds detach #1131
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |