1- name : CI
1+ name : CI/CD
22
33on :
44 push :
5- branches-ignore :
6- - " **"
7- pull_request :
85 branches :
9- - " **"
6+ - main # Only run on push to master
7+ pull_request : # Run on all pull requests
8+ workflow_dispatch :
109
1110jobs :
12- lint :
11+ flake8 :
1312 runs-on : ubuntu-latest
14- steps :
15- - name : Checkout code
16- uses : actions/checkout@v4
1713
14+ steps :
15+ - uses : actions/checkout@master
1816 - name : Set up Python
1917 uses : actions/setup-python@v5
2018 with :
21- python-version : " 3.x"
22-
19+ python-version : " 3.11"
2320 - name : Install dependencies
2421 run : |
25- python -m pip install --upgrade pip
26- pip install flake8
27-
28- - name : Run flake8
22+ python -m pip install --upgrade pip setuptools wheel
23+ pip install --no-cache-dir -e .[test]
24+ pip list
25+ - name : Lint with Flake8
2926 run : |
30- flake8 --max-line-length 99 --exclude tests/genfiles_raw,*.json
27+ flake8 --ignore=E501,W503 --exclude=func_adl_xAOD/template
3128
32- test :
33- needs : lint
34- runs-on : ${{ matrix.os }}
29+ test-no-docker :
3530 strategy :
3631 matrix :
37- os : [ubuntu-latest, macos-latest, windows-latest]
38- python-version : ["3.10", "3.11", "3.12", "3.13"]
32+ platform : [ubuntu-latest, macOS-latest, windows-latest]
33+ python-version : ["3.11"]
34+ runs-on : ${{ matrix.platform }}
35+ needs : flake8
3936
4037 steps :
41- - name : Checkout code
42- uses : actions/checkout@v4
43-
44- - name : Set up Python
38+ - uses : actions/checkout@master
39+ - name : Set up Python ${{ matrix.python-version }}
4540 uses : actions/setup-python@v5
4641 with :
4742 python-version : ${{ matrix.python-version }}
48-
4943 - name : Install dependencies
5044 run : |
51- python -m pip install --upgrade pip
52- pip install .[test,xAOD ]
53-
54- - name : Run tests
45+ python -m pip install --upgrade pip setuptools wheel
46+ pip install --no-cache-dir -e .[test]
47+ pip list
48+ - name : Test with pytest
5549 run : |
56- pytest
50+ python -m pytest
5751
58- coverage :
59- needs : lint
60- runs-on : ubuntu-latest
61- steps :
62- - name : Checkout code
63- uses : actions/checkout@v4
52+ test-with-docker :
53+ strategy :
54+ matrix :
55+ platform : [ubuntu-latest, macOS-latest, windows-latest]
56+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
57+ runs-on : ${{ matrix.platform }}
58+ needs : flake8
6459
65- - name : Set up Python
60+ steps :
61+ - uses : actions/checkout@master
62+ - name : Set up Python ${{ matrix.python-version }}
6663 uses : actions/setup-python@v5
6764 with :
68- python-version : " 3.x"
69-
65+ python-version : ${{ matrix.python-version }}
7066 - name : Install dependencies
7167 run : |
72- python -m pip install --upgrade pip
73- pip install .[test,xAOD]
74-
75- - name : Run tests with coverage
68+ python -m pip install --upgrade pip setuptools wheel
69+ pip install git+https://github.com/iris-hep/ast-language.git@e6470deb68529e1885a4bc46f781e2fe43a6f4c8
70+ pip install --no-cache-dir -e .[test,local]
71+ pip list
72+ - name : Install Docker on macOS
73+ if : matrix.platform == 'macOS-latest'
74+ run : brew install docker
75+ - name : Test with pytest
7676 run : |
77- pytest --cov=.
78-
79- - name : Upload coverage to Codecov
80- uses : codecov/codecov-action@v5
77+ python -m pytest
78+ # These now take too long, and macOS and Windows both don't have docker installed
79+ # or installed correctly.
80+ # python -m pytest -m "atlas_xaod_runner or atlas_r22_xaod_runner or cms_aod_runner or cms_miniaod_runner"
81+ - name : Report coverage with Codecov
82+ if : github.event_name == 'push' && matrix.python-version == 3.9 && matrix.platform == 'ubuntu-latest'
83+ uses : codecov/codecov-action@v3
8184 with :
8285 token : ${{ secrets.CODECOV_TOKEN }}
8386 files : ./coverage.xml
84- flags : unittests
85- name : pytest-code-coverage
87+ flags : unittests
0 commit comments