-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (44 loc) · 1.19 KB
/
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
name: test
on:
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
defaults:
run:
shell: bash
jobs:
build-book:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y netcdf-bin
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.12"
# Setup virtualenv with caching
- name: Setup venv
uses: syphar/restore-virtualenv@v1
with:
requirement_files: requirements.txt
# Pip download cache
- name: Setup pip cache
uses: syphar/restore-pip-download-cache@v1
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
# Install dependencies
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
# Build the Jupyter Book
- name: Build book
run: |
jupyter book build book/