Skip to content

Commit

Permalink
Implement MSSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
chaseWillden committed Oct 25, 2024
1 parent e9b0154 commit 5cba9c6
Show file tree
Hide file tree
Showing 27 changed files with 3,004 additions and 13 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
MYSQL_PASSWORD: njord_password
MYSQL_HOST: 127.0.0.1
run: cargo test --test mysql_tests

oracle:
name: oracle
runs-on: ubuntu-latest
Expand Down Expand Up @@ -145,3 +146,59 @@ jobs:
APP_USER_PASSWORD: test
ORACLE_HOST: 127.0.0.1
run: cargo test --test oracle_tests
mssql:
name: mssql
runs-on: ubuntu-20.04

services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: njord_password
MSSQL_PID: Developer

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Cache Cargo Dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run Clippy
run: cargo clippy --all-targets --all-features

- name: Build Project
run: cargo build --release --features "mssql"

- name: Install SQLCMD tools
run: |
sudo apt-get update
sudo apt-get install -y curl apt-transport-https
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
- name: Set up MSSQL schema
run: |
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P njord_password -C -i "${{ github.workspace }}/njord/db/test/mssql/setup.sql"
- name: Running Integration Tests for MSSQL
env:
MSSQL_DATABASE: njord_db
MSSQL_USER: njord_user
MSSQL_PASSWORD: njord_password
MSSQL_HOST: localhost
run: cargo test --test mssql_tests
Loading

0 comments on commit 5cba9c6

Please sign in to comment.