-
Notifications
You must be signed in to change notification settings - Fork 529
71 lines (57 loc) · 1.78 KB
/
test.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Run Test
on:
workflow_dispatch:
pull_request:
branches: [main]
# push: # Trigger the workflow on push events
concurrency:
group: "test"
cancel-in-progress: false
jobs:
pytest:
name: Run Test
strategy:
fail-fast: false
matrix:
# os: [macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11"]
defaults:
run:
working-directory: software
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
# Ensure dependencies are installed without relying on a lock file.
poetry update
poetry install
# Install ffmpeg on Ubuntu
- name: Installing ffmpeg in Ubuntu
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install ffmpeg
# Install ffmpeg on macOS using Homebrew
- name: Installing ffmpeg in Mac
if: matrix.os == 'macos-latest'
run: brew install ffmpeg
# Install choco and then ffmpeg on Windows
- name: Installing choco and ffmpeg in Windows
if: matrix.os == 'windows-latest'
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install ffmpeg
# Run pytest
- name: Run Pytest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: poetry run pytest