-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
48 lines (48 loc) · 1.58 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# action.yml
name: 'Mypy Github Action'
description: 'GitHub Action to run mypy linting'
author: 'Jash Parekh <[email protected]>'
branding:
icon: 'activity'
color: 'orange'
inputs:
path:
description: 'File or directory to run mypy on'
required: false
default: '.'
mypy_version:
description: 'Version of mypy library to use for linting'
required: false
default: ''
mypy_config_file:
description: 'Location of mypy config file in the repository'
required: false
default: ''
mypy_options:
description: 'Optional mypy options (refer to `mypy --help`)'
required: false
default: ''
requirements:
description: 'Optional, if not empty specified libraries will be installed before running `mypy`'
required: false
default: ''
requirement_files:
description: 'Optional, if not empty specified install all the libraries specified in the files before running `mypy`'
required: false
default: ''
python_version:
description: 'Python version to use to run lint'
required: false
default: '3.10'
outputs:
output:
description: 'The output of mypy'
runs:
using: 'composite'
steps:
- id: build
run: docker build ${{ github.action_path }} --build-arg "python_version=${{ inputs.python_version }}" -t mypy
shell: bash
- id: run
run: docker run --rm -v $(pwd):/github/workspace --workdir /github/workspace mypy "${{ inputs.path }}" "${{ inputs.mypy_version }}" "${{ inputs.mypy_config_file }}" "${{ inputs.mypy_options }}" "${{ inputs.requirements }}" "${{ inputs.requirement_files }}"
shell: bash