Skip to content

Tests

Tests #11717

Workflow file for this run

name: Tests
on:
push:
branches:
- master
- ci
- "releases/*"
- "release/*"
pull_request:
branches:
- '*'
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
inputs: {}
env:
RUST_TEST_THREADS: 3
RUST_BACKTRACE: 1
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-latest, macos-latest, windows-2025]
# migrations tests work only on nightly
edgedb-version: ["nightly"]
env:
CI: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@6691ebadcb18182cc1391d07c9f295f657c593cd
with:
components: "cargo,rustc,rust-std"
toolchain: '1.88'
- name: Install EdgeDB
uses: edgedb/setup-edgedb@v1
if: ${{ matrix.os != 'windows-2025' }}
with:
server-version: ${{ matrix.edgedb-version }}
- run: |
cargo test --features github_action_install
musl-test:
runs-on: ${{ matrix.os }}
timeout-minutes: 35
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
# migrations tests work only on nightly
edgedb-version: ["nightly"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install musl-tools
run: "sudo apt-get install musl-tools"
# The build fails without this. I don't know why.
- name: Remove rust-toolchain.toml
run: |
rm rust-toolchain.toml
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@6691ebadcb18182cc1391d07c9f295f657c593cd
with:
components: "cargo,rustc,rust-std"
targets: "x86_64-unknown-linux-musl"
toolchain: '1.88'
- run: |
cargo build --bins --target=x86_64-unknown-linux-musl
- uses: actions/upload-artifact@v4
with:
name: edgedb-linux-binary
path: target/x86_64-unknown-linux-musl/debug/gel
- name: Install EdgeDB
uses: edgedb/setup-edgedb@v1
if: ${{ matrix.os != 'windows-2025' }}
with:
server-version: ${{ matrix.edgedb-version }}
- run: |
cargo test --bins --target=x86_64-unknown-linux-musl
portable-install-tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 35
strategy:
matrix:
os: [ubuntu-22.04]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@6691ebadcb18182cc1391d07c9f295f657c593cd
with:
components: "cargo,rustc,rust-std"
toolchain: '1.88'
- run: |
cargo build --tests --features portable_tests
test-bin-installable:
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@6691ebadcb18182cc1391d07c9f295f657c593cd
with:
components: "cargo,rustc,rust-std"
toolchain: '1.88'
- run: |
cargo install --locked --path=. --root=$TMPDIR
cqa:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@6691ebadcb18182cc1391d07c9f295f657c593cd
with:
components: "cargo,rustc,rust-std"
toolchain: '1.88'
- run: |
cargo clippy --all-features --workspace --all-targets
- run: |
cargo fmt --check