-
Notifications
You must be signed in to change notification settings - Fork 139
57 lines (43 loc) · 1.73 KB
/
code_style.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
49
50
51
52
53
54
55
56
57
# This is a basic workflow to help you get started with Actions
name: Check code style
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
[ push, pull_request ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "style"
style:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# A strategy creates a build matrix for your jobs
strategy:
# You can define a matrix of different job configurations
matrix:
# Each option you define in the matrix has a key and value
python-version: [ 3.8 ]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Set up Git repository
uses: actions/checkout@v2
# Setup Python with version from matrix
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install requirements
- name: Install requirements
# Runs command-line programs using the operating system's shell
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements.txt
python -m pip list
# Install pre-commit from .pre-commit-config.yaml
- name: Install pre-commit
run: |
pre-commit install
# Run pre-commit on all the files in the repo
- name: Run pre-commit
run: |
pre-commit run --all-files --color always --verbose --show-diff-on-failure