CI #2620
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 | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| schedule: | |
| - cron: '30 15 * * *' # 3:30pm every day | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| continuous-integration: | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Docker and Prereqs | |
| # This uses a workaround for a known issue with docker. See here: https://github.com/actions/virtual-environments/issues/5490#issuecomment-1118328567 | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install build-essential curl -y | |
| sudo apt-get install runc containerd docker.io -y || true | |
| sudo rm -f /etc/docker/daemon.json | |
| sudo systemctl restart docker | |
| sudo gpasswd -a $USER docker | |
| - name: Install rustc and clippy nightly | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly-2025-02-15 #make sure this matches the version in the rust-toolchain files | |
| components: cargo, rustc, clippy, rustfmt | |
| target: wasm32-unknown-unknown | |
| - name: Setup rust dependency caching | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "wasm-worker-> target" | |
| - name: Install golang | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '>=1.21' | |
| - name: Set up Python 3 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install pylint | |
| run: pip3 install pylint==3.3.3 | |
| - name: Install revive (go linter) | |
| run: go install github.com/mgechev/[email protected] | |
| - name: Install cross | |
| run: cargo install cross --locked | |
| - name: Build OpenLambda | |
| run: | | |
| make ol imgs/ol-wasm wasm-worker wasm-functions native-functions container-proxy | |
| make install-python-bindings | |
| make sudo-install | |
| - name: Test Go Common | |
| working-directory: go/common | |
| run: go test -v | |
| timeout-minutes: 5 | |
| - name: Test Go Worker | |
| working-directory: go/worker | |
| run: go test -v ./... | |
| timeout-minutes: 5 | |
| - name: Test Python (SOCK) | |
| run: sudo env "PATH=$PATH" ./scripts/test.py --worker_type=sock | |
| timeout-minutes: 20 | |
| - name: Test Python (Docker) | |
| # not all features are supported by docker yet, so we only run some of the tests | |
| run: sudo env "PATH=$PATH" ./scripts/test.py --worker_type=docker --test_blocklist=max_mem_alloc | |
| - name: Boss/Lambda Store Tests | |
| run: sudo env "PATH=$PATH" python3 scripts/boss_test.py local | |
| timeout-minutes: 5 | |
| - name: Test Binaries (WebAssembly) | |
| timeout-minutes: 10 | |
| run: | | |
| sudo rm -f test.json | |
| env RUST_LOG=info ./scripts/bin_test.py --worker_type=wasm | |
| - name: Test Binaries (SOCK) | |
| timeout-minutes: 20 | |
| run: sudo env "PATH=$PATH" ./scripts/bin_test.py --worker_type=sock | |
| - name: Test SOCK | |
| timeout-minutes: 20 | |
| run: sudo env "PATH=$PATH" ./scripts/sock_test.py | |
| - name: Linting | |
| run: make lint |