-
Notifications
You must be signed in to change notification settings - Fork 10
76 lines (71 loc) · 2.13 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Lint
on:
push:
branches: [ main ]
pull_request:
concurrency:
group: unit-test${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l -eo pipefail {0}
jobs:
pre-commit-checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12']
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: test
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install pre-commit
run: |
python -m pip install pre-commit
- name: Run pre-commit checks
run: |
pre-commit run --all-files
- name: Check to see what files pre-commit modified
run: |
git diff
mypy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12']
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: test
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install dependencies and FFmpeg
run: |
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
conda install "ffmpeg=7.0.1" pkg-config -c conda-forge
ffmpeg -version
- name: Build and install torchcodec
run: |
python -m pip install -e ".[dev]" --no-build-isolation -vvv
- name: Install mypy
run: |
python -m pip install mypy
- name: Run mypy
run: |
mypy --install-types --non-interactive --config-file mypy.ini