-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: commcare-export tests | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
env: | ||
PG_USER: postgres | ||
PG_PASSWORD: postgres | ||
MYSQL_USER: user | ||
MYSQL_PASSWORD: pass | ||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
services: | ||
mssql: | ||
image: mcr.microsoft.com/mssql/server:2017-latest | ||
env: | ||
SA_PASSWORD: Password-123 | ||
ACCEPT_EULA: 'Y' | ||
ports: | ||
- 1433:1433 | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: ${{ env.PG_PASSWORD }} | ||
POSTGRES_USER: ${{ env.PG_USER }} | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
mysql: | ||
image: mysql:latest | ||
env: | ||
MYSQL_ROOT_PASSWORD: "root" | ||
# MYSQL_DATABASE: ${{ env.MYSQL_DB }} | ||
MYSQL_USER: ${{ env.MYSQL_USER }} | ||
MYSQL_PASSWORD: ${{ env.MYSQL_PASSWORD }} | ||
options: >- | ||
--health-cmd="mysqladmin ping" | ||
--health-interval=10s | ||
--health-timeout=5s | ||
--health-retries=3 | ||
ports: | ||
- 3306:3306 | ||
strategy: | ||
matrix: | ||
# python-version: [3.7, 3.8] # Version 3.6 with arch x64 not found | ||
python-version: [3.8] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 50 | ||
- run: git fetch --tags origin | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: sudo apt-get install pandoc | ||
- run: python setup.py sdist | ||
- run: pip install dist/* | ||
- run: pip install pymysql psycopg2 pyodbc | ||
- run: pip install coverage coveralls | ||
#- sudo ACCEPT_EULA=Y apt-get install msodbcsql17 | ||
- run: pip install mypy | ||
- run: pip install pytest | ||
- run: pip install -e ".[test]" | ||
# - run: coverage run setup.py test | ||
# - run: pytest -m postgres | ||
# env: | ||
# POSTGRES_URL: postgresql://${{ env.PG_USER }}:${{ env.PG_PASSWORD }}@localhost/ | ||
- run: mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO '${{ env.MYSQL_USER }}'@'%';"; | ||
- run: pytest -k test_create_checkpoint_table -m mysql | ||
env: | ||
MYSQL_URL: mysql+pymysql://${{ env.MYSQL_USER }}:${{ env.MYSQL_PASSWORD }}@localhost/ | ||
|
||
# - run: mypy --install-types --non-interactive @mypy_typed_modules.txt | ||
# - run: coveralls | ||
|
||
|
||
# - name: Install docs requirements | ||
# run: pip install -r requirements/docs-requirements.txt | ||
# - name: Test docs build | ||
# run: bash ./scripts/test-make-docs.sh | ||
# - name: Upload test artifacts | ||
# if: always() | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: make-docs-artifacts | ||
# path: artifacts | ||
# if-no-files-found: ignore | ||
# retention-days: 7 |
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