Skip to content

402 update fluka support #903

402 update fluka support

402 update fluka support #903

Workflow file for this run

name: Automated tests
on:
push:
branches: [ master ]
tags: ['*']
pull_request:
branches: [ master ]
release:
types: [published]
jobs:
# fast tests inluding linter and couple of fastests unit tests run with pytest
smoke_test:
if: >
!contains(github.event.head_commit.message, '[ci skip]') &&
!contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history, as by default only last 1 commit is fetched
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tests/requirements-test.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics pymchelper tests examples
- name: Smoke test with pytest
run: |
pytest -k "smoke" tests/
# all tests on matrix of all possible python versions and OSes
normal_test:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
platform: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- platform: macos-latest
python-version: '3.8'
- platform: macos-latest
python-version: '3.10'
- platform: macos-latest
python-version: '3.11'
runs-on: ${{ matrix.platform }}
needs: [smoke_test]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history, as by default only last 1 commit is fetched
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tests/requirements-test.txt
- name: Test with pytest
run: |
pytest -k "not slow" tests/