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:
|
2024-09-25 06:07:58 +02:00
|
|
|
pull_request:
|
2024-09-25 21:33:53 +02:00
|
|
|
types: [synchronize, review_requested]
|
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
|
2023-08-16 23:39:50 +02:00
|
|
|
strategy:
|
2024-08-17 18:48:42 +02:00
|
|
|
fail-fast: false
|
2023-08-16 23:39:50 +02:00
|
|
|
matrix:
|
2024-09-17 20:28:59 +02:00
|
|
|
toolchain:
|
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
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:31:42 +01:00
|
|
|
- run: cargo test --verbose
|
2024-09-17 20:28:59 +02:00
|
|
|
|
2024-10-30 13:31:42 +01:00
|
|
|
test-build:
|
|
|
|
needs: [test-unit]
|
|
|
|
runs-on: ${{ matrix.runner }}
|
2024-09-17 12:53:53 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-30 13:31:42 +01:00
|
|
|
runner:
|
|
|
|
- ubuntu-latest
|
|
|
|
- windows-latest
|
|
|
|
- macos-latest
|
|
|
|
features:
|
|
|
|
- java
|
|
|
|
- js
|
|
|
|
- py
|
|
|
|
- luajit
|
|
|
|
- lua54
|
2024-09-17 12:53:53 +02:00
|
|
|
toolchain:
|
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
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:31:42 +01:00
|
|
|
- run: cargo build --release --verbose --features=${{ matrix.features }}
|
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
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
- 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 }}
|