Skip to content
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions .github/workflows/fortran-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,44 @@ on:
type: string
default: "3.14"

concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated

jobs:
fortitude-linting:
fortran-linting:
name: Fortran lint
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated
runs-on: ${{ inputs.runner }}
timeout-minutes: ${{ inputs.timeout }}

env:
UV_CACHE_DIR: /tmp/.uv_cache
UV_PYTHON: ${{ inputs.python-version }}
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
- name: Setup uv
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ inputs.python-version }}
python-version: ${{ env.UV_PYTHON }}
enable-cache: true
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated

- name: Cache pip packages
- name: restore uv cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ inputs.python-version }}
path: ${{ env.UV_CACHE_DIR }}
key: ${{ runner.os }}-${{ hashFiles('uv.lock') }}fortitude-0.7.3
restore-keys: |
${{ runner.os }}-pip-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated

- name: minimize pip cache
run: python -m pip cache purge || true

- name: Install Fortitude Linter
run: |
python -m pip install --upgrade pip
python -m pip install fortitude-lint==0.7.3
- name: Generate uv environment
run: uv init && uv add fortitude-lint==0.7.3
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated

- name: Run Fortitude Linter
run: fortitude check --respect-gitignore --show-fixes --file-extensions=f90,F90,x90,X90 .
run: uv run fortitude check --respect-gitignore --show-fixes --file-extensions=f90,F90,x90,X90 .
Comment thread
Pierre-siddall marked this conversation as resolved.
Outdated

- name: minimize uv cache
run: uv cache prune --ci