Skip to content

Reusable build-cache workflow #5

Reusable build-cache workflow

Reusable build-cache workflow #5

# Copyright 2022-2024 Universität Tübingen, DKFZ and EMBL
# for the German Human Genome-Phenome Archive (GHGA)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Static Code Analysis
on: push
jobs:
build-cache:
uses: ./.github/workflows/prepare_build_cache.yaml

Check failure on line 22 in .github/workflows/static_code_analysis.yaml

View workflow run for this annotation

GitHub Actions / Static Code Analysis

Invalid workflow file

The workflow is not valid. In .github/workflows/static_code_analysis.yaml (Line: 22, Col: 11): Error from called workflow ghga-de/file-services-backend/.github/workflows/prepare_build_cache.yaml@07a5b3dae7eb3fd75b8c361fa56a41d074acebf4 (Line: 25, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.pythonLocation
with:
cache-key: ${{ github.sha }}
static-code-analysis:
name: Static Code Analysis
needs: build-cache
runs-on: ubuntu-latest
steps:
- name: Restore cache
id: restore-cache
uses: actions/cache@v4
with:
path: ${{ needs.build-cache.outputs.python-location }}
key: ${{ github.sha }}
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
env:
SKIP: no-commit-to-branch
- name: Run ruff
id: ruff
run: |
ruff check --output-format=github .
ruff format --check .
- name: Run mypy
id: mypy
run: |
mypy .
- name: Check license header and file
id: license-checker
run: |
./scripts/check_license.py