Reusable build-cache workflow #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 GitHub Actions / Static Code AnalysisInvalid workflow file
|
||
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 |