feat(lambda): give function containers the AWS environment #11
Workflow file for this run
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: SDKs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "sdks/**" | |
| - "crates/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/sdks.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "sdks/**" | |
| - "crates/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/sdks.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| # Compile the fakecloud server once and share it with every language's e2e | |
| # job as an artifact. The SDK e2e suites exec the prebuilt binary at | |
| # `target/release/fakecloud` (they never `cargo run`), so a downloaded binary | |
| # is all they need — no per-language Rust rebuild. | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: ./.github/actions/free-disk | |
| - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| # Dedicated key so this never collides with ci.yml's free-disk `test` | |
| # job cache (which symlinks ./target onto /mnt). The job is not named | |
| # `test`, so `github.job` won't clash either. | |
| shared-key: sdk-build | |
| - name: Build fakecloud | |
| run: cargo build --release | |
| - name: Upload fakecloud binary | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: fakecloud-binary-sdk | |
| path: target/release/fakecloud | |
| if-no-files-found: error | |
| retention-days: 1 | |
| # ---- Python ---------------------------------------------------------------- | |
| python-lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/python | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install '.[dev]' | |
| - run: ruff check . | |
| - run: ruff format --check . | |
| python-typecheck: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/python | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install '.[dev]' | |
| - run: mypy src | |
| python-test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/python | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Download fakecloud binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: fakecloud-binary-sdk | |
| path: target/release | |
| - name: Mark fakecloud binary executable | |
| run: chmod +x target/release/fakecloud | |
| working-directory: . | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install '.[dev]' | |
| - run: pytest -v | |
| # ---- TypeScript ------------------------------------------------------------ | |
| typescript: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/typescript | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Download fakecloud binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: fakecloud-binary-sdk | |
| path: target/release | |
| - name: Mark fakecloud binary executable | |
| run: chmod +x target/release/fakecloud | |
| working-directory: . | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: sdks/typescript/package-lock.json | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm run build | |
| - run: npm test | |
| # ---- Go -------------------------------------------------------------------- | |
| go-build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/go | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.24" | |
| cache-dependency-path: sdks/go/go.sum | |
| - run: go build ./... | |
| - run: go test ./... | |
| go-e2e: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Download fakecloud binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: fakecloud-binary-sdk | |
| path: target/release | |
| - name: Mark fakecloud binary executable | |
| run: chmod +x target/release/fakecloud | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.24" | |
| cache-dependency-path: sdks/go/e2e/go.sum | |
| - name: Run e2e tests | |
| run: go test -v -timeout 120s ./... | |
| working-directory: sdks/go/e2e | |
| go-lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "1.24" | |
| cache-dependency-path: sdks/go/go.sum | |
| - uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 | |
| with: | |
| working-directory: sdks/go | |
| args: --timeout=5m | |
| - uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 | |
| with: | |
| working-directory: sdks/go/e2e | |
| args: --timeout=5m | |
| # ---- Java ------------------------------------------------------------------ | |
| java: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/java | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Download fakecloud binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: fakecloud-binary-sdk | |
| path: target/release | |
| - name: Mark fakecloud binary executable | |
| run: chmod +x target/release/fakecloud | |
| working-directory: . | |
| - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: gradle | |
| - name: Build and test | |
| run: ./gradlew build --no-daemon | |
| # ---- PHP ------------------------------------------------------------------- | |
| php: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/php | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Download fakecloud binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: fakecloud-binary-sdk | |
| path: target/release | |
| - name: Mark fakecloud binary executable | |
| run: chmod +x target/release/fakecloud | |
| working-directory: . | |
| - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: "8.3" | |
| extensions: curl, json | |
| tools: composer | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run unit tests | |
| run: vendor/bin/phpunit --testsuite unit | |
| - name: Run E2E tests | |
| # The harness self-spawns target/release/fakecloud on an ephemeral | |
| # port and fails loud if it is missing/unhealthy (no manual boot). | |
| run: vendor/bin/phpunit --testsuite e2e | |
| # ---- .NET ------------------------------------------------------------------ | |
| dotnet: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: sdks/dotnet | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Download fakecloud binary | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: fakecloud-binary-sdk | |
| path: target/release | |
| - name: Mark fakecloud binary executable | |
| run: chmod +x target/release/fakecloud | |
| working-directory: . | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 10.0.x | |
| - name: Run unit + E2E tests | |
| # The E2E collection fixture spawns the downloaded binary itself from | |
| # target/release (fail-loud if missing), so no manual boot is needed. | |
| run: dotnet test --configuration Release |