-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (52 loc) · 1.45 KB
/
Copy pathgenerate.yml
File metadata and controls
66 lines (52 loc) · 1.45 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
name: generate-images
on:
pull_request:
paths:
- 'litclock.yaml'
push:
branches:
- master
paths:
- 'litclock.yaml'
workflow_dispatch:
jobs:
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python dependencies
run: pip install pyyaml Pillow
- name: Run Python tests
run: python -m unittest test_insert_quote test_yaml_to_formats test_quote_to_image -v
generate-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Install Python dependencies
run: pip install pyyaml
- name: Generate JSON and CSV
run: python yaml_to_formats.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: 'litclock.json litclock_annotated_improved.csv'
commit_message: Update generated data files
generate-images:
runs-on: ubuntu-latest
needs: [test-python, generate-data]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Install Python dependencies
run: pip install pyyaml "Pillow>=9.2"
- name: Generate images
run: |
rm -rf images && \
python quote_to_image.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: 'images/**'
skip_dirty_check: true
commit_message: Update images dir