Skip to content

updating

updating #629

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit Testing
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
unit-testing-parse:
# Use a matrix strategy to test against multiple Python versions
runs-on: ubuntu-latest
strategy:
matrix:
# Define the Python versions you want to test
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
# Step to set up Python using the version from the matrix
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Added step to explicitly output the Python version for clarity in logs
- name: 🐍 Display Python version
run: python -V
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Check if the pip install -r requirements_test.txt line is correct
# It's common to name the test requirements file 'requirements_dev.txt' or 'requirements_test.txt'
# Assuming your file is 'requirements_test.txt'
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_test.txt ]; then pip install -r requirements_test.txt; fi
- name: Testing Parse
run: |
# Use python -m pytest to ensure the correct environment's pytest is used
python -m pytest -vv --cov=massql ./tests/test_parse.py
- name: Run test_translate
run: |
pytest -vv --cov=massql ./tests/test_translate.py
test-data-processing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: ts-graphviz/setup-graphviz@v1
- name: Download Test Data
run: |
cd tests && sh ./get_data.sh
cd ..
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_test.txt ]; then pip install -r requirements_test.txt; fi
- name: Run test_extraction
run: |
pytest -vv --cov=massql ./tests/test_extraction.py
- name: Run test_visualize
run: |
pytest -vv --cov=massql ./tests/test_visualize.py
- name: Run test_file_loading
run: |
pytest -vv --cov=massql ./tests/test_file_loading.py
- name: Run test_query
run: |
pytest -vv --cov=massql ./tests/test_query.py -n 4