2024-09-09 17:08:24 +02:00
|
|
|
name: test
|
2023-08-16 23:38:34 +02:00
|
|
|
|
|
|
|
on:
|
2024-09-25 21:34:34 +02:00
|
|
|
push:
|
2023-08-16 23:38:34 +02:00
|
|
|
|
|
|
|
env:
|
2023-08-16 23:39:50 +02:00
|
|
|
CARGO_TERM_COLOR: always
|
2023-08-16 23:38:34 +02:00
|
|
|
|
2024-09-09 17:08:24 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2023-08-16 23:38:34 +02:00
|
|
|
jobs:
|
2024-10-30 13:31:42 +01:00
|
|
|
test-unit:
|
|
|
|
runs-on: ubuntu-latest
|
2024-09-17 20:28:59 +02:00
|
|
|
steps:
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
2024-10-30 13:45:39 +01:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2024-10-30 13:31:42 +01:00
|
|
|
- run: cargo test --verbose
|
2024-09-17 20:28:59 +02:00
|
|
|
|
2024-10-30 13:45:39 +01:00
|
|
|
test-beta:
|
|
|
|
runs-on: ubuntu-latest
|
2024-10-30 13:31:42 +01:00
|
|
|
needs: [test-unit]
|
2024-09-17 12:53:53 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
toolchain:
|
|
|
|
- beta
|
2024-10-30 13:45:39 +01:00
|
|
|
- nightly
|
2024-09-17 12:53:53 +02:00
|
|
|
steps:
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
2024-10-30 13:45:39 +01:00
|
|
|
- run: cargo test --verbose
|
2024-10-30 13:27:25 +01:00
|
|
|
|
|
|
|
test-functional:
|
2024-10-30 13:31:42 +01:00
|
|
|
needs: [test-unit]
|
2024-10-30 13:27:25 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
2024-10-30 13:45:39 +01:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2024-10-30 13:27:25 +01:00
|
|
|
- run: cargo test --verbose --features=test-e2e
|
|
|
|
env:
|
|
|
|
CODEMP_TEST_USERNAME_ALICE: ${{ secrets.CODEMP_TEST_USERNAME_ALICE }}
|
|
|
|
CODEMP_TEST_PASSWORD_ALICE: ${{ secrets.CODEMP_TEST_PASSWORD_ALICE }}
|
|
|
|
CODEMP_TEST_USERNAME_BOB: ${{ secrets.CODEMP_TEST_USERNAME_BOB }}
|
|
|
|
CODEMP_TEST_PASSWORD_BOB: ${{ secrets.CODEMP_TEST_PASSWORD_BOB }}
|
2024-10-30 13:45:39 +01:00
|
|
|
|
|
|
|
test-build:
|
2024-10-30 16:58:21 +01:00
|
|
|
needs: [test-functional]
|
2024-10-30 13:45:39 +01:00
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
runner:
|
|
|
|
- ubuntu-latest
|
|
|
|
- windows-latest
|
|
|
|
- macos-latest
|
|
|
|
features:
|
|
|
|
- java
|
|
|
|
- js
|
|
|
|
- py
|
2024-11-16 16:28:46 +01:00
|
|
|
- lua
|
2024-10-30 13:45:39 +01:00
|
|
|
steps:
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- run: cargo build --release --verbose --features=${{ matrix.features }}
|