[pre-commit.ci] pre-commit autoupdate #5860
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
name: static analysis | |
on: | |
push: | |
pull_request: | |
# Run every Monday at 6am UTC | |
schedule: | |
- cron: '0 6 * * 1' | |
# execute commands with conda aware shell by default: | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Lint | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files --show-diff-on-failure | |
mypy: | |
name: mypy | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all tags and branches | |
- uses: CagtayFabry/pydeps2env@main | |
with: | |
file: 'pyproject.toml' | |
channels: 'conda-forge defaults' | |
extras: '' | |
setup_requires: 'include' | |
- name: Cache mypy cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
./.mypy_cache | |
key: ${{ runner.os }}-${{ hashFiles('./environment.yml') }} | |
- name: Setup Conda Environment | |
uses: mamba-org/[email protected] | |
with: | |
environment-file: ./environment.yml | |
environment-name: weldx | |
cache-environment: true | |
create-args: >- | |
python=3.9 | |
mypy | |
- name: activate env | |
run: micromamba activate weldx | |
- name: pip installs | |
run: | | |
python -m pip install -e . | |
- name: Add mypy annotator | |
uses: pr-annotators/[email protected] | |
- name: run mypy | |
run: | | |
mypy --install-types --non-interactive weldx/ |