66 switch db to sql server with aw-2022-lt db #180
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
name: CI | |
on: pull_request | |
jobs: | |
ci: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.10" ] | |
poetry-version: [ "1.5.1" ] | |
env: | |
PYTHONDONTWRITEBYTECODE: 1 | |
PYTHONUNBUFFERED: 1 | |
SA_PASSWORD: Alaska2023 | |
ACCEPT_EULA: Y | |
MSSQL_DB: master | |
MSSQL_HOST: localhost | |
MSSQL_USER: sa | |
MSSQL_SA_PASSWORD: Alaska2023 | |
SQL_DATASOURCE_NAME: my_gxshakezz | |
services: | |
mssql: | |
image: mcr.microsoft.com/mssql/server:2022-latest | |
volumes: | |
- /sqlserver/setup:/var/opt/mssql/backup | |
env: | |
SA_PASSWORD: Alaska2023 | |
ACCEPT_EULA: Y | |
MSSQL_PID: Developer | |
ports: | |
- 1433:1433 | |
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'Alaska2023' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install SQL Server Tools | |
run: sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools18 | |
- name: Download AdventureWorksLT2022 backup | |
run: | | |
curl -L -o AdventureWorksLT2022.bak https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorksLT2022.bak | |
cp AdventureWorksLT2022.bak ./sqlserver/setup/AdventureWorksLT2022.bak | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Test Code Coverage | |
run: poetry run coverage run -m pytest -v --cov=app --cov-report=xml | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 |