generated from ebmdatalab/notebook-template
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (53 loc) · 1.62 KB
/
build_runner.yaml
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
name: Build-runner
on:
push:
paths:
- "run.py"
jobs:
build:
runs-on: windows-latest
name: Build windows executable for running notebook
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Build with pyinstaller
run: |
pyinstaller run.py --onefile
- name: Commit files
run: |
copy dist\run.exe run.exe
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add run.exe
git commit -m "Updated windows build of run.py"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
test_job:
# This is a copy of the yaml in `test_runner.yaml`, so that when
# there's a build, the tests are guaranteed to run *after* the
# build. Otherwise the build status would potentially overwrite
# the test status, making red PRs no longer red.
#
# There is currently no `include`-like functionality in Github
# Actions, though this is apparently going to change:
# https://github.com/actions/starter-workflows/issues/245
runs-on: ubuntu-latest
name: Test notebooks are runnable and up-to-date
needs: build
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Test
uses: ./.github/actions/build
with:
args: ./run_tests.sh