Skip to content

Commit

Permalink
Add windows tests file separately
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Jul 2, 2024
1 parent 28c6831 commit 1ea06cf
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Windows Tests

on:
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false

matrix:
os: [ windows-latest ]
python-version: [ '3.9', '3.10', '3.11' ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Install spglib
run: |
conda install -c conda-forge spglib # avoid spglib warnings
- name: Test
run: |
pytest -vv -m "not mpl_image_compare" tests # all non-plotting tests
- name: Plotting Tests
if: always() # run even if non-plotting tests fail
id: plotting_tests # Add an ID to this step for reference
run: |
pytest --mpl -m "mpl_image_compare" tests # all plotting tests
- name: Generate GH Actions test plots
if: failure() && steps.plotting_tests.outcome == 'failure' # Run only if plotting tests fail
run: |
# Generate the test plots in case there were any failures:
pytest --mpl-generate-path=tests/remote_baseline -m "mpl_image_compare" tests
# Upload test plots
- name: Archive test plots
if: always()
uses: actions/upload-artifact@v4
with:
name: output-plots
path: tests/remote_baseline

0 comments on commit 1ea06cf

Please sign in to comment.