Skip to content

added jec_era Tag for the JEC #28

added jec_era Tag for the JEC

added jec_era Tag for the JEC #28

name: Lint and test
on:
workflow_dispatch:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout ⬇️
uses: actions/checkout@master
with:
persist-credentials: false
submodules: recursive
- name: Setup python 🐍
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies ☕️
run: |
pip install -U pip
pip install -r requirements_dev.txt
- name: Lint 🔍
run: |
flake8 cmsdb scripts
collect_dirs:
runs-on: ubuntu-latest
outputs:
dirs: ${{ steps.dirs.outputs.dirs }}
steps:
- uses: actions/checkout@v2
- id: dirs
run: echo "dirs=$(ls -d cmsdb/campaigns/*/ | jq --raw-input --slurp --compact-output 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
test:
needs: collect_dirs
runs-on: ubuntu-latest
strategy:
matrix:
dir: ${{ fromJson(needs.collect_dirs.outputs.dirs) }}
steps:
- name: Checkout ⬇️
uses: actions/checkout@master
with:
persist-credentials: false
submodules: recursive
- name: Setup python 🐍
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies ☕️
run: |
pip install -U pip
pip install -r requirements_dev.txt
- name: Test Campaigns 🚦
run: python -m unittest tests/test_campaigns.py
env:
TESTMODULE: ${{ matrix.dir }}