Fixed bugs caused by moving actions to do_get #58
Workflow file for this run
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
# 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: Cargo 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: | |
cargo_build_lint_and_test: | |
name: Cargo Build, Lint, and Test | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
# 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;" | |
# 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 | |
# Run 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 | |
# Upload Code Coverage Report. | |
- name: grcov | |
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/ |