-
Notifications
You must be signed in to change notification settings - Fork 139
81 lines (67 loc) · 2.29 KB
/
pythonapp.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
# lfs: true
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install ".[dev]"
sudo apt-get update
sudo apt-get install libssl-dev libcurl4-openssl-dev
- name: Test with nose
run: |
nosetests -s -v
- name: Generate profiling reports
run: |
python -m pmlb.profiling
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install R packages
run: Rscript -e 'install.packages(c("rmarkdown", "plotly", "dplyr", "htmlwidgets", "htmltools", "jsonlite", "readr", "DT", "remotes", "pmlbr"))'
- name: Set up reticulate
run: |
install.packages("reticulate")
library(reticulate)
reticulate::install_miniconda()
reticulate::py_config()
reticulate::py_discover_config()
shell: Rscript {0}
- name: Build site
run: |
Rscript -e 'print(reticulate::py_discover_config())'
Rscript -e 'rmarkdown::render_site(input = "docs_sources")'
- run: ls -lhR docs/
- name: Deploy
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && !github.event.repository.fork
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
# keep existing files if no changes, unless commit message has regenerate_profiles
keep_files: ${{ env.regenerate_profiles == null }}