-
Notifications
You must be signed in to change notification settings - Fork 191
57 lines (51 loc) · 1.45 KB
/
unit-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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Unit Test
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check disk space
run: |
df -h
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Check disk space
run: |
df -h
- name: Install dependencies
run: |
sudo apt-get install ffmpeg
python -m pip install --upgrade pip
pip install -v -e .[all]
- name: Increase swapfile
run: |
df -h
free -h
sudo swapoff -a
sudo fallocate -l 12G /mnt/swapfile
sudo chmod 600 /mnt/swapfile
sudo mkswap /mnt/swapfile
sudo swapon /mnt/swapfile
sudo swapon --show
- name: Clean data-juicer assets and models after cached
uses: webiny/[email protected]
with:
run: rm -rf ~/.cache/data_juicer
- name: Cache data-juicer assets and models
uses: actions/cache@v3
with:
path: ~/.cache/data_juicer
key: dj-assets-models
- name: Check disk space
run: |
df -h
- name: Run the test
run: |
python tests/run.py