-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (82 loc) · 2.85 KB
/
Copy pathmain.yml
File metadata and controls
91 lines (82 loc) · 2.85 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches: [main, update-**]
pull_request:
branches: ["**"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.user.login != 'dependabot[bot]' }}
runs-on: ${{ matrix.os }}
env:
UV_CACHE_DIR: /tmp/.uv-cache
strategy:
matrix:
python-version: ["3.12"]
# os: [macos-13, ubuntu-latest]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
#- os: macos-13
# path: ~/Library/Caches/pip
#- os: windows-latest
# path: ~\AppData\Local\pip\Cache
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
uv-version: latest
- name: Install python
id: setup-python
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Load cached venv
id: cached-dependencies
uses: actions/cache@v6
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}
- name: Install and activate the project
run: |
make install-all
uv cache prune --ci
source .venv/bin/activate
- uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
with:
# like "6.1.0". At the moment semver specifiers (i.e. >=6.1.0) are supported
# only on Windows, on other platforms they are allowed but version is matched
# exactly regardless.
ffmpeg-version: release
# Linking type of the binaries. Use "shared" to download shared binaries and
# "static" for statically linked ones. Shared builds are currently only available
# for windows releases. Defaults to "static"
# linking-type: static
# As of version 3 of this action, builds are no longer downloaded from GitHub
# except on Windows: https://github.com/GyanD/codexffmpeg/releases.
github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }}
# Test MiV-OS using pytest
- name: Run pytests
if: always()
run: |
make test
- name: Run mypy
if: always()
run: |
make mypy
- name: Run formatting check
if: always()
run: |
make check-codestyle