-
Notifications
You must be signed in to change notification settings - Fork 13
41 lines (32 loc) · 995 Bytes
/
lint.yaml
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
###
### Workflow that lints code in pull requests
###
name: Lint
# Note: No name so it uses the name associated with the pull request merge to main
on:
pull_request:
paths:
- 'pivotal-import/**'
jobs:
lint-pivotal-import:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Get Python Version
run: echo "PYTHON_VERSION=$(cat .python-version | grep ^[^#])" >> $GITHUB_ENV
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pipenv"
- name: Install pipenv
run: pip install --user pipenv
- name: Install Python dependencies
working-directory: ./pivotal-import
run: pipenv install --dev
- name: Lint Python with Black linter
working-directory: ./pivotal-import
run: make lint