[Proposal] options to redirect update to machine #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: python ci | |
on: | |
push: | |
branches: [ "dev/main" ] | |
pull_request: | |
branches: [ "dev/main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.9", "3.10", "3.12" ] | |
steps: | |
- name: checkout dt4acc | |
uses: actions/checkout@v4 | |
with: | |
repository: hz-b/dt4acc | |
path: dt4acc | |
ref: dev/main | |
submodules: False | |
- name: checkout bact-device-models | |
uses: actions/checkout@v4 | |
with: | |
repository: hz-b/bact-device-models | |
path: bact-device-models | |
ref: dev/main | |
submodules: False | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
**/pyproject.toml | |
**/requirements*.txt | |
- name: python pip package update | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest setuptools wheel | |
- name: Install bact device models | |
run : | | |
find . -type d | |
find . -type f | |
if [ -f bact-device-models/requirements.txt ]; then pip install -r bact-device-models/requirements.txt; fi | |
pip install ./bact-device-models | |
- name: Install this package | |
run: | | |
if [ -f dt4acc/src/requirements.txt ]; then pip install -r dt4acc/src/requirements.txt; fi | |
# need to add that? ... seems so | |
pip install dt4acc/src | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 dt4acc/src --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 dt4acc/src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
run: | | |
CALCULATION_ENGINE=default pytest dt4acc/src/tests |