Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unit tests in ci #71

Merged
merged 2 commits into from
Aug 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
PYTHONUNBUFFERED: 1
SA_PASSWORD: Alaska2023
ACCEPT_EULA: Y
MSSQL_DB: master
MSSQL_DB: AdventureWorksLT2022
MSSQL_HOST: localhost
MSSQL_USER: sa
MSSQL_SA_PASSWORD: Alaska2023
Expand All @@ -39,7 +39,7 @@ jobs:


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
Expand All @@ -52,17 +52,22 @@ jobs:
- name: Restore AdventureWorksLT2022 backup
run: |
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'Alaska2023' -d master -Q 'RESTORE DATABASE AdventureWorksLT2022 FROM DISK = "/var/opt/mssql/restore/AdventureWorksLT2022.bak" WITH MOVE "AdventureWorksLT2022_Data" TO "/var/opt/mssql/data/AdventureWorksLT2022.mdf", MOVE "AdventureWorksLT2022_log" TO "/var/opt/mssql/data/AdventureWorksLT2022_log.ldf"'
# - 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
- name: Cleanup
run: |
rm -f AdventureWorksLT2022.bak
sudo rm -rf adventure_works
- uses: actions/checkout@v3
- 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