chore: rustfmt and 'docker-compose' on the CI action #203
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: ['main', 'development'] | |
pull_request: | |
branches: ['main', 'development'] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
multiplatform-tests: | |
name: Testing on Rust ${{ matrix.rust }} for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { rust: stable, os: ubuntu-latest } | |
# - { rust: nightly, os: ubuntu-latest } | |
- { rust: stable, os: macos-latest } | |
- { rust: stable, os: windows-latest } | |
steps: | |
- name: Make the USER own the working directory. Installing required build dependencies | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo chown -R $USER:$USER ${{ github.workspace }} | |
sudo apt -y install gcc libgssapi-krb5-2 libkrb5-dev libsasl2-modules-gssapi-mit docker-compose | |
- uses: actions/checkout@v3 | |
- name: docker-compose | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: docker-compose -f ./docker/docker-compose.yml up -d | |
- name: Caching cargo dependencies | |
id: project-cache | |
uses: Swatinem/rust-cache@v2 | |
- uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: ${{ matrix.rust }} | |
- name: Load data for MSSQL tests | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: cargo test initialize_sql_server_docker_instance -p tests --target=x86_64-unknown-linux-gnu --all-features --no-fail-fast -- --show-output --nocapture --include-ignored | |
- name: Run all tests, UNIT and INTEGRATION for Linux targets | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: cargo test --verbose --workspace --all-features --no-fail-fast -- --show-output --test-threads=1 | |
- name: Run only UNIT tests for Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
cargo test --verbose --workspace --lib --target=x86_64-pc-windows-msvc --all-features --no-fail-fast -- --show-output | |
cargo test --verbose --workspace --doc --target=x86_64-pc-windows-msvc --all-features --no-fail-fast -- --show-output | |
- name: Run only UNIT tests for MacOS | |
if: ${{ matrix.os == 'MacOS-latest' }} | |
run: | | |
cargo test --verbose --workspace --lib --all-features --no-fail-fast -- --show-output | |
cargo test --verbose --workspace --doc --all-features --no-fail-fast -- --show-output |