-
Notifications
You must be signed in to change notification settings - Fork 38
74 lines (61 loc) · 1.85 KB
/
Copy pathci.yml
File metadata and controls
74 lines (61 loc) · 1.85 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
name: Anvil CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
packages: write
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "25.x"
- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Fission CLI
run: |
if ! command -v fission >/dev/null 2>&1; then
cargo install cargo-fission --version 0.4.1 --locked
fi
- name: Shared release gates
run: ./scripts/release-gates.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker Image for Testing
uses: docker/build-push-action@v5
with:
context: .
file: anvil/Dockerfile
load: true
push: false
tags: anvil:test
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Release-Gated Docker E2E Tests
if: github.event_name == 'pull_request' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')))
env:
ANVIL_IMAGE: anvil:test
ANVIL_RUN_DOCKER_E2E: "1"
ANVIL_RUN_HF_E2E: "1"
run: cargo test -p anvil-server --test docker_cluster_test --test hf_ingestion_e2e -- --nocapture --test-threads=1