-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (34 loc) · 1.07 KB
/
test_package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Test package
on:
push:
branches: [main]
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
test_package:
strategy:
matrix:
python-version: ['3.10', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "poetry>=1.2,<1.8"
- name: Install package and dependencies
env:
INSTALL_ENDF_PARSERPY_CPP: ${{ github.event_name == 'push' && 'no' || 'yes' }}
run: poetry install --with dev
- name: Run all tests
if: github.event_name != 'push'
run: poetry run pytest
- name: Run tests (skip cpp parser tests)
if: github.event_name == 'push'
run: poetry run pytest --ignore=tests/test_endf_cpp_parser.py --ignore=tests/test_endf_cpp_parser_options.py