forked from ocademy-ai/machine-learning
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.23 KB
/
assignment.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
name: test-assignment
# Only run this when the master branch changes
on:
push:
branches:
- assignment
# If your git repository has the Jupyter Book within some-subfolder next to
# unrelated files, you can make this run only if a file within that specific
# folder has been modified.
#
paths:
- open-machine-learning-jupyter-book/assignments/**
- .github/**
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
test-assignment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Install dependencies
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest
pip install nbmake
- name: Get file changes
id: get_file_changes
uses: trilom/[email protected]
with:
output: ' '
- name: Echo file changes
run: |
echo Changed files: ${{ steps.get_file_changes.outputs.files }}
- name: Test the assignment
run: |
pytest --nbmake ${{ steps.get_file_changes.outputs.files }}