Skip to content

Commit d4abdfc

Browse files
committed
Added tests on Windows
1 parent 920bddd commit d4abdfc

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/windows.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: test-windows
2+
run-name: Tests Windows
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
push:
8+
branches: [ main ]
9+
10+
defaults:
11+
run:
12+
shell: bash -e -l {0}
13+
14+
jobs:
15+
test:
16+
name: Run ctests
17+
runs-on: windows-latest
18+
strategy:
19+
fail-fast: true
20+
matrix:
21+
json_version: [ develop, v3.12.0, v3.8.0 ]
22+
23+
steps:
24+
25+
- name: Setup MSVC
26+
uses: ilammy/msvc-dev-cmd@v1
27+
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Set conda environment
32+
uses: mamba-org/setup-micromamba@main
33+
with:
34+
environment-name: myenv
35+
environment-file: environment-dev.yml
36+
init-shell: bash
37+
cache-downloads: true
38+
create-args: |
39+
ninja
40+
41+
- name: Configure using cmake
42+
run: cmake -Bbuild -DCMAKE_BUILD_TYPE:STING=Release -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -G Ninja
43+
44+
- name: Build
45+
working-directory: build
46+
run: ninja
47+
48+
- name: Run tests
49+
working-directory: build
50+
run: ctest -R ^test$ --output-on-failure

environment-dev.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: json-schema-validator
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- cmake
6+
- ninja
7+
- nlohmann_json

0 commit comments

Comments
 (0)