generated from python-discord/code-jam-template
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (28 loc) · 1.2 KB
/
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
# GitHub Action Workflow enforcing our code style.
name: Lint, Build & Deploy
# Trigger the workflow on both push (to the main repository)
# and pull requests (against the main repository, but from any repo).
on: [push, pull_request]
# Brand new concurrency setting! This ensures that not more than one run can be triggered for the same commit.
# It is useful for pull requests coming from the main repository since both triggers will match.
concurrency: lint-${{ github.sha }}
jobs:
lint:
runs-on: ubuntu-latest
env:
# Set an environment variable to select pip's cache directory for us to actually cache between runs.
PIP_CACHE_DIR: /tmp/pip-cache-dir
# The Python version your project uses. Feel free to change this if required.
PYTHON_VERSION: 3.9
steps:
# Checks out the repository in the current folder.
- name: Checks out repository
uses: actions/checkout@v2
# Set up the right version of Python
- name: Set up Python ${{ env.PYTHON_VERSION }}
id: python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Run pre-commit hooks.
uses: pre-commit/action@v2.0.3