Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arvkevi committed Feb 22, 2024
1 parent 22ab627 commit c2e9fd6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- 'master'
- 'main'
pull_request:
branches:
- '**'
Expand All @@ -13,35 +13,34 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
#os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9']
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# - name: Ensure Python and source code are on same drive (Windows)
# if: ${{ matrix.os == 'windows-latest' }}
# shell: cmd
# run: |
# mkdir C:\a
# xcopy D:\a C:\a /s /e
- name: Ensure Python and source code are on same drive (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: cmd
run: |
mkdir C:\a
xcopy D:\a C:\a /s /e
- name: Install dependencies
run: |
pip install pytest-cov
pip install .
# run this command to move the data files to the user's home directory
ezancestry --help
# - name: Test with pytest (Ubuntu & macOS)
# if: ${{ matrix.os != 'windows-latest' }}
# run: |
# pytest --cov=ezancestry tests
# - name: Test with pytest (Windows)
# if: ${{ matrix.os == 'windows-latest' }}
# working-directory: C:\a\ezancestry\ezancestry
# run: |
# pytest --cov=ezancestry tests
- name: Test with pytest (Ubuntu & macOS)
if: ${{ matrix.os != 'windows-latest' }}
run: |
pytest --cov=ezancestry tests
- name: Test with pytest (Windows)
if: ${{ matrix.os == 'windows-latest' }}
working-directory: C:\a\ezancestry\ezancestry
run: |
pytest --cov=ezancestry tests
5 changes: 1 addition & 4 deletions tests/test_ezancestry.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ def test_predict_from_file(algorithm):
write_predictions=False,
models_directory=data_directory.joinpath("models"),
aisnps_directory=None,
n_components=None,
k=None,
algorithm=algorithm,
aisnps_set=None,
)
assert (
results.loc[
"sample_genome_snps.txt", "predicted_population_superpopulation"
"sample_genome_snps.txt", "predicted_ancestry_superpopulation"
]
== "EUR"
)

0 comments on commit c2e9fd6

Please sign in to comment.