-
Notifications
You must be signed in to change notification settings - Fork 91
110 lines (85 loc) · 3.14 KB
/
quick-test-compile-zoo.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: 'quick-test-compile-zoo'
on:
push:
branches: [ "main" ]
pull_request: # run on pull requests!
jobs:
quick-test-compile-zoo:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
path: ./eczoo_data
# Check out site generation code
- name: Check out eczoo_sitegen code
run: |
git clone https://github.com/errorcorrectionzoo/eczoo_sitegen.git --depth=1 eczoo_sitegen
# --------------------------------
# Install NodeJS
- uses: actions/setup-node@v3
with:
#cache: 'yarn'
node-version: '20'
- name: Corepack enable
run: 'corepack enable'
working-directory: ./eczoo_sitegen/
- name: Yarn version
run: 'yarn --version'
working-directory: ./eczoo_sitegen/
# --------------------------------
#
# SET UP CACHES
#
# Cache Yarn Modules
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ./eczoo_sitegen
- name: Restore yarn modules cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
#restore-keys: |
# yarn-cache-folder-
# Cache citation information (downloaded information & compiled citations)
- name: Restore citations information cache
uses: actions/cache@v3
with:
path: eczoo_sitegen/_zoodb_citations_cache_LOCAL
#key: zoodb-citations-cache-LOCAL-${{ github.sha }}-${{ hashFiles('**/yarn.lock') }}
key: zoodb-citations-cache-LOCAL
#restore-keys: |
# zoodb-citations-cache-LOCAL-
- name: Initialize local citation information cache if applicable
run: |
if [ ! -e _zoodb_citations_cache_LOCAL/cache_downloaded_info.json ]; then
mkdir -p _zoodb_citations_cache_LOCAL/
cp _zoodb_citations_cache/*.json _zoodb_citations_cache_LOCAL/
fi
working-directory: ./eczoo_sitegen
# # Cache Yarn Modules
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
# shell: bash
# working-directory: ./eczoo_sitegen
# - name: Restore yarn cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
# restore-keys: |
# yarn-cache-folder-
# --------------------------------
# Install any missing modules
- name: Yarn install
run: 'yarn'
working-directory: ./eczoo_sitegen/
# --------------------------------
- name: Quick build site
run: 'yarn build-simple-noparcel'
working-directory: ./eczoo_sitegen/site/
env:
ECZOO_CITATIONS_CACHE_DIR: "_zoodb_citations_cache_LOCAL"