-
Notifications
You must be signed in to change notification settings - Fork 114
51 lines (47 loc) · 1.26 KB
/
main.yml
File metadata and controls
51 lines (47 loc) · 1.26 KB
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
# This is a basic workflow to help you get started with Actions
name: MLGO CI
permissions:
contents: read
on:
push:
branches:
- 'main'
repository_dispatch:
pull_request:
jobs:
LicenseCheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: ./check-license.sh
Checks:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.10', '3.11']
task: [Typecheck, Lint, Ruff, Yapf, Test]
include:
- task: Typecheck
cmd: pytype -j auto .
- task: Lint
cmd: pylint --rcfile .pylintrc --recursive yes .
- task: Ruff
cmd: ruff check
- task: Yapf
cmd: yapf . -drp
- task: Test
cmd: pytest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: Pipfile.lock
- name: Install Pipenv
run: pip3 install pipenv
- name: Install Python Dependencies
run: pipenv sync --categories="packages dev-packages ci" --verbose
- name: ${{ matrix.task }}
run: pipenv run ${{ matrix.cmd }}