diff --git a/.github/workflows/black-formatter.yml b/.github/workflows/black-formatter.yml index 47fadb2e..9487a9ff 100644 --- a/.github/workflows/black-formatter.yml +++ b/.github/workflows/black-formatter.yml @@ -1,19 +1,29 @@ name: Black Linter on: - push: - branches: - - main - pull_request: - branches: - - main + push: + branches-ignore: + - main + paths-ignore: + - "docs/**" + pull_request: + branches: + - main + paths-ignore: + - "docs/**" workflow_dispatch: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: always. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: psf/black@stable - with: - options: "--check --verbose --diff" - version: "~= 22.0" \ No newline at end of file + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: psf/black@stable + with: + options: "--check --verbose --diff --color" + version: "~= 22.0" diff --git a/.github/workflows/test-pippin.yml b/.github/workflows/test-pippin.yml index e43582f6..2d181425 100644 --- a/.github/workflows/test-pippin.yml +++ b/.github/workflows/test-pippin.yml @@ -1,42 +1,59 @@ name: test-pippin on: - push: - branches: - - main - pull_request: - branches: - - main + push: + branches-ignore: + - main + paths-ignore: + - "docs/**" + - ".github/**" + pull_request: + branches: + - main + paths-ignore: + - "docs/**" + - ".github/**" workflow_dispatch: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: always. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + test: + name: Python ${{ matrix.python-version }} - ${{ github.event_name }} + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: true + matrix: + # '3.7' is the minimum supported version + # '3.x' is the lateest minor release of Python 3 + python-version: ["3.7", "3.x"] - steps: - - name: Check out repository code - uses: actions/checkout@v2 + steps: + - name: Check out repository code + uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools wheel - pip install -r requirements.txt - pip install -r requirements_dev.txt - pip install -U numpy + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + pip install -r requirements.txt + pip install -r requirements_dev.txt + pip install -U numpy - - name: Setup pippin - run: | - python setup.py sdist + - name: Setup pippin + run: | + python setup.py sdist - - name: Test pippin - run: | - pytest -v . - env: - SNANA_DIR: SNANA_DIR + - name: Test pippin + run: | + pytest -v . + env: + SNANA_DIR: SNANA_DIR