|
21 | 21 | - 'docker-compose.yml' |
22 | 22 |
|
23 | 23 |
|
| 24 | +concurrency: |
| 25 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 26 | + cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 27 | + |
24 | 28 | jobs: |
25 | | - # This workflow contains a single job called "build" |
26 | | - build: |
27 | | - name: Unittest AMD64 Ubuntu ${{ matrix.ubuntu }} |
| 29 | + ut-linux: |
| 30 | + name: UT on Ubuntu-${{ matrix.ubuntu }} |
28 | 31 | # The type of runner that the job will run on |
29 | 32 | runs-on: ubuntu-latest |
30 | 33 | timeout-minutes: 30 |
31 | 34 | strategy: |
32 | 35 | fail-fast: false |
33 | 36 | matrix: |
34 | | - ubuntu: [18.04] |
| 37 | + ubuntu: [22.04] |
35 | 38 | env: |
36 | 39 | UBUNTU: ${{ matrix.ubuntu }} |
37 | 40 | steps: |
38 | 41 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
39 | 42 | - uses: actions/checkout@v3 |
40 | 43 | with: |
41 | 44 | submodules: 'true' |
42 | | - |
| 45 | + |
| 46 | + - uses: Swatinem/rust-cache@v2 |
| 47 | + |
43 | 48 | - name: Setup Milvus |
44 | | - run: sudo docker-compose up -d && sleep 15s |
| 49 | + run: docker compose -f ./docker-compose.yml up -d && sleep 15s |
45 | 50 |
|
46 | | - - name: Setup protoc |
47 | | - uses: arduino/setup-protoc@v1.1.2 |
48 | | - with: |
49 | | - repo-token: ${{ secrets.GITHUB_TOKEN }} |
50 | | - |
51 | 51 | # Runs a single command using the runners shell |
52 | 52 | - name: Run Unittest |
53 | 53 | run: RUST_BACKTRACE=1 cargo test |
54 | 54 | # - name: Upload coverage to Codecov |
55 | 55 | # if: github.repository == 'milvus-io/milvus-sdk-rust' |
56 | 56 | # uses: codecov/codecov-action@v1 |
57 | 57 | # with: |
58 | | - # token: ${{ secrets.CODECOV_TOKEN }} |
| 58 | + # token: ${{ secrets.CODECOV_TOKEN }} |
59 | 59 | # file: ./coverage.project.out |
60 | 60 | # name: ubuntu-${{ matrix.ubuntu }}-unittests |
| 61 | + |
| 62 | + ut-macos: |
| 63 | + name: Compile on macOS 15 |
| 64 | + runs-on: macos-15 |
| 65 | + timeout-minutes: 30 |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v3 |
| 68 | + with: |
| 69 | + submodules: 'true' |
| 70 | + |
| 71 | + - uses: Swatinem/rust-cache@v2 |
| 72 | + |
| 73 | + # GitHub-hosted macOS runners do not provide Docker for the Milvus integration-test stack. |
| 74 | + # Compile test binaries on macOS, but run Milvus-backed integration tests on Linux. |
| 75 | + - name: Compile Tests |
| 76 | + run: cargo test --no-run |
0 commit comments