|
| 1 | +name: CI Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - develop |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - develop |
| 10 | + |
| 11 | +jobs: |
| 12 | + test-vine-core: |
| 13 | + name: Test vine-core (Rust) |
| 14 | + runs-on: ubuntu-latest |
| 15 | + |
| 16 | + steps: |
| 17 | + - name: Checkout code |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Setup Rust |
| 21 | + uses: dtolnay/rust-toolchain@stable |
| 22 | + |
| 23 | + - name: Cache Rust dependencies |
| 24 | + uses: actions/cache@v4 |
| 25 | + with: |
| 26 | + path: | |
| 27 | + ~/.cargo/bin/ |
| 28 | + ~/.cargo/registry/index/ |
| 29 | + ~/.cargo/registry/cache/ |
| 30 | + ~/.cargo/git/db/ |
| 31 | + vine-core/target/ |
| 32 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 33 | + restore-keys: | |
| 34 | + ${{ runner.os }}-cargo- |
| 35 | +
|
| 36 | + - name: Build vine-core |
| 37 | + working-directory: vine-core |
| 38 | + run: cargo build --release |
| 39 | + |
| 40 | + - name: Run vine-core tests |
| 41 | + working-directory: vine-core |
| 42 | + run: cargo test |
| 43 | + |
| 44 | + test-vine-spark: |
| 45 | + name: Test vine-spark (Scala) |
| 46 | + runs-on: ubuntu-latest |
| 47 | + needs: test-vine-core |
| 48 | + |
| 49 | + steps: |
| 50 | + - name: Checkout code |
| 51 | + uses: actions/checkout@v4 |
| 52 | + |
| 53 | + - name: Setup Java 11 |
| 54 | + uses: actions/setup-java@v4 |
| 55 | + with: |
| 56 | + distribution: 'temurin' |
| 57 | + java-version: '11' |
| 58 | + |
| 59 | + - name: Setup Rust (for native library) |
| 60 | + uses: dtolnay/rust-toolchain@stable |
| 61 | + |
| 62 | + - name: Cache Rust dependencies |
| 63 | + uses: actions/cache@v4 |
| 64 | + with: |
| 65 | + path: | |
| 66 | + ~/.cargo/bin/ |
| 67 | + ~/.cargo/registry/index/ |
| 68 | + ~/.cargo/registry/cache/ |
| 69 | + ~/.cargo/git/db/ |
| 70 | + vine-core/target/ |
| 71 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 72 | + restore-keys: | |
| 73 | + ${{ runner.os }}-cargo- |
| 74 | +
|
| 75 | + - name: Cache SBT dependencies |
| 76 | + uses: actions/cache@v4 |
| 77 | + with: |
| 78 | + path: | |
| 79 | + ~/.ivy2/cache |
| 80 | + ~/.sbt |
| 81 | + vine-spark/target |
| 82 | + vine-spark/project/target |
| 83 | + key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} |
| 84 | + restore-keys: | |
| 85 | + ${{ runner.os }}-sbt- |
| 86 | +
|
| 87 | + - name: Build Rust library |
| 88 | + working-directory: vine-core |
| 89 | + run: cargo build --release |
| 90 | + |
| 91 | + - name: Run vine-spark tests |
| 92 | + working-directory: vine-spark |
| 93 | + run: sbt test |
0 commit comments