💚 fix use of setup-dotnet
github action
#68
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: Main Workflow | |
on: | |
push: | |
# branches: | |
# - main | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
jobs: | |
build: | |
# needs: [embedded-build] | |
## runs-on: ubuntu-4cores | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Download embedded artifacts | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: embedded | |
# path: ./rust-embedded/target/debug | |
- name: Setup dotnet 9.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
##dotnet-version: "9.0.x" | |
- name: Install .NET tools | |
run: dotnet tool restore | |
- name: Check Formatting | |
run: dotnet csharpier --check . | |
- name: Install dependencies | |
run: dotnet restore | |
# - name: Build | |
# run: dotnet build --no-restore | |
# test: | |
# needs: [embedded-build] | |
# runs-on: ubuntu-4cores | |
# strategy: | |
# matrix: | |
# surrealdb_version: ["v1.5.5", "v2.0.4", "v2.1.2"] | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# - name: Download embedded artifacts | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: embedded | |
# path: ./rust-embedded/target/debug | |
# - name: Download SurrealDB | |
# run: curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh -s -- --version ${{ matrix.surrealdb_version }} | |
# - name: Run SurrealDB root | |
# run: | | |
# if [ "${{ matrix.surrealdb_version }}" == "v1.5.5" ]; then | |
# surreal start --user root --pass root memory --auth --allow-guests & | |
# else | |
# surreal start --user root --pass root memory --allow-guests & | |
# fi | |
# - name: Setup dotnet 9.0 | |
# uses: actions/setup-dotnet@v4 | |
# with: | |
# dotnet-version: "9.0.x" | |
# - name: Install dependencies | |
# run: dotnet restore | |
# - name: Build | |
# run: dotnet build --no-restore | |
# - name: Test library | |
# run: > | |
# dotnet test | |
# ./SurrealDb.Net.Tests/SurrealDb.Net.Tests.csproj | |
# --no-restore | |
# --no-build | |
# --collect "XPlat Code Coverage" | |
# --results-directory .coverage | |
# -- | |
# DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
# - name: Test Live Query feature | |
# run: > | |
# dotnet test | |
# ./SurrealDb.Net.LiveQuery.Tests/SurrealDb.Net.LiveQuery.Tests.csproj | |
# --no-restore | |
# --no-build | |
# --collect "XPlat Code Coverage" | |
# --results-directory .coverage | |
# -- | |
# DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
# - name: Upload Coverage | |
# if: matrix.surrealdb_version == 'v2.1.2' | |
# uses: codecov/codecov-action@v5 | |
# with: | |
# directory: .coverage | |
# embedded-build: | |
# runs-on: ubuntu-4cores | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# with: | |
# sparse-checkout: | | |
# rust-embedded | |
# - name: Install stable toolchain | |
# uses: dtolnay/rust-toolchain@stable | |
# - name: Cache Rust dependencies | |
# uses: Swatinem/rust-cache@v2 | |
# - name: Build libraries | |
# working-directory: ./rust-embedded | |
# run: cargo build | |
# - name: Publish embedded artifacts | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: embedded | |
# path: | | |
# ./rust-embedded/target/debug/libsurreal_memory.so | |
# ./rust-embedded/target/debug/libsurreal_rocksdb.so | |
# ./rust-embedded/target/debug/libsurreal_surrealkv.so | |
cargo-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
rust-embedded | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run check | |
working-directory: ./rust-embedded | |
run: cargo check --all | |
- name: Run tests | |
working-directory: ./rust-embedded | |
run: cargo test | |
- name: Run format | |
working-directory: ./rust-embedded | |
run: | | |
cargo check --all | |
cargo fix --allow-no-vcs | |
- name: Run lint | |
working-directory: ./rust-embedded | |
run: cargo clippy -- -Dwarnings | |
cargo-deny: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
manifests: | |
- ./rust-embedded/shared/Cargo.toml | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
rust-embedded | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
manifest-path: ${{ matrix.manifests }} | |