forked from OpenMined/PySyft
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.51 KB
/
translated-tutorials.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
name: Tutorials-Translations
on:
push:
branches:
- master
paths:
- "examples/tutorials/translations/**"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "examples/tutorials/translations/**"
jobs:
translation-tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
steps:
- uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v1.1.2
id: cache-reqs
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-${{ matrix.python-version }}-pip-${{ hashFiles('pip-dep/requirements*.txt') }}
- name: Install dependencies
run: |
sudo apt-get update
python -m pip install --upgrade pip
hash -r
pip3 install -r pip-dep/requirements.txt
pip3 install -r pip-dep/requirements_dev.txt
pip3 install -r pip-dep/requirements_udacity.txt
pip3 install -r pip-dep/requirements_notebooks.txt
python setup.py install
- name: Test with pytest
run: |
git diff --name-only origin/master HEAD examples/tutorials/translations/ > ./test/notebooks/git-diff.txt
pytest --randomly-dont-reorganize test/notebooks/test_notebooks.py::test_notebooks_basic_translations_diff