-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (34 loc) · 1.39 KB
/
test-e2e.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
name: E2E tests
on: push
jobs:
e2e:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: FedericoCarboni/setup-ffmpeg@v3
- uses: actions/checkout@v3
- uses: astral-sh/setup-uv@v3
- name: Install Python 3.12
run: uv python install 3.12
- name: Install project
run: uv tool install .
- name: Transcribe video
run: yt2doc --video https://podcasts.apple.com/gb/podcast/why-should-you-think-like-an-economist/id1523898793?i=1000487091931 -o output.md
- name: Display output.md
run: cat output.md
- name: Check if the output has more than 2000 characters on Linux
if: matrix.os == 'ubuntu-latest'
run: test $(wc -c < output.md) -gt 2000
- name: Check if the output has more than 2000 characters on Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: (Get-Item output.md).Length -gt 2000
- name: Check if the output has more than 10 blank lines on Linux
if: matrix.os == 'ubuntu-latest'
run: test $(awk 'BEGIN {paragraphs=0} /^$/ {paragraphs++} END {print paragraphs+1}' output.md) -gt 10
- name: Check if the output has more than 10 blank lines on Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: ((Get-Content output.md -Raw) -split '\r?\n\r?\n').Count -gt 10