Fix bug causing in-memory data folder to fail (#340) #65
This file contains hidden or 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
| # Copyright 2022 The ModelarDB Contributors | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Build, Lint, and Test | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| push: | |
| branches: [ "main" ] | |
| env: | |
| # General. | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -C instrument-coverage -C strip=symbols -D warnings | |
| RUSTDOCFLAGS: -D warnings | |
| LLVM_PROFILE_FILE: modelardb-%p-%m.profraw | |
| # MinIO. | |
| AWS_ACCESS_KEY_ID: minioadmin | |
| AWS_SECRET_ACCESS_KEY: minioadmin | |
| AWS_DEFAULT_REGION: eu-central-1 | |
| AWS_ENDPOINT: http://127.0.0.1:9000 | |
| AWS_ALLOW_HTTP: true | |
| jobs: | |
| build_lint_and_test: | |
| name: Build, Lint, and Test | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| matrix: | |
| operating-system: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| # Setup Windows specific environment variables. | |
| - name: Setup Windows Environment | |
| if: runner.os == 'Windows' | |
| run: echo "CXXFLAGS=-std:c++20" >> $env:GITHUB_ENV | |
| # Retrieve Code. | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Setup MinIO. | |
| - name: Setup MinIO | |
| shell: bash | |
| run: | | |
| case $(uname) in | |
| "Linux") | |
| curl https://dl.min.io/server/minio/release/linux-amd64/minio -o minio ;; | |
| "Darwin") | |
| curl https://dl.min.io/server/minio/release/darwin-arm64/minio -o minio ;; | |
| *) | |
| curl https://dl.min.io/server/minio/release/windows-amd64/minio.exe -o minio ;; | |
| esac | |
| chmod +x minio | |
| ./minio server minio_data_folder --console-address ":9001" & | |
| aws s3 mb s3://modelardb --endpoint-url http://localhost:9000 | |
| # Setup Azurite. | |
| - name: Setup Azurite | |
| shell: bash | |
| run: | | |
| npm install azurite | |
| node_modules/.bin/azurite -l azurite_data_folder & | |
| az storage container create -n modelardb --connection-string "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;" | |
| # Setup Protobuf Compiler. | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| # Update Rust. | |
| - name: Rustup Update | |
| run: rustup update | |
| - name: Rustup Add llvm-tools | |
| run: rustup component add llvm-tools-preview | |
| - name: Cargo Install grcov | |
| run: cargo install grcov | |
| - name: Cargo Install machete | |
| run: cargo install cargo-machete | |
| # Cache Cargo Dependencies. | |
| - name: Cache Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| # Run Rust Lints and Tests. | |
| - name: Cargo Build | |
| run: cargo build --verbose --all-targets | |
| - name: Cargo Clippy | |
| run: cargo clippy --verbose --all-targets | |
| - name: Cargo Doc | |
| run: cargo doc --verbose --no-deps | |
| - name: Cargo Machete | |
| run: cargo machete --with-metadata | |
| - name: Cargo Test | |
| run: cargo test --verbose --all-targets -- --nocapture | |
| # Run Python Tests. | |
| - name: Python Version | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Pip Update | |
| run: python -m pip install pip --force-reinstall --break-system-packages --user | |
| - name: Pip Install | |
| run: python -m pip install . --break-system-packages --user | |
| working-directory: crates/modelardb_embedded/bindings/python | |
| - name: Python Unittest | |
| run: python -m unittest --verbose | |
| working-directory: crates/modelardb_embedded/bindings/python | |
| # Upload Code Coverage Report. | |
| - name: Grcov Upload | |
| run: grcov . --source-dir . --binary-path ./target/debug/ --output-types html --branch --ignore-not-existing -o ./target/debug/coverage/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Code Coverage ${{ matrix.operating-system }} | |
| path: ./target/debug/coverage/ |