-
-
Notifications
You must be signed in to change notification settings - Fork 24
79 lines (65 loc) · 1.74 KB
/
daily.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
72
73
74
75
76
77
78
79
name: Daily random word
on:
schedule:
# At 06:00 (UTC) every day
- cron: "0 6 * * *"
# Allow to call the workflow manually
workflow_dispatch:
jobs:
# First job just to fill the pip cache
warmup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}
- name: Install requirements
if: steps.cache.outputs.cache-hit != 'true'
run: python -m pip install -r requirements.txt
daily:
runs-on: ubuntu-latest
needs: [warmup]
strategy:
fail-fast: false
matrix:
locale: # XXX_LOCALES
- "ca"
- "da"
- "de"
# - "el"
- "en"
- "es"
- "fr"
- "it"
- "no"
- "pt"
- "ro"
- "ru"
- "sv"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}
- name: Get a random word
id: get-word
run: python -Wd -m wikidict ${{ matrix.locale }} --get-word=''
- name: Check that random word
run: python -Wd -m wikidict ${{ matrix.locale }} --check-word=${{ steps.get-word.outputs.word }}