-
Notifications
You must be signed in to change notification settings - Fork 61
59 lines (57 loc) · 1.79 KB
/
run-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
56
57
58
59
name: Run test on Kedro Starters
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
spaceflights-pyspark:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{inputs.python-version}}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install test requirements
run: make install-test-requirements
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup spark
uses: vemonet/setup-spark@v1
with:
spark-version: '3.4.1'
hadoop-version: '3'
- uses: jannekem/run-python-script-action@v1
with:
script: |
import os
import yaml
from pathlib import Path
project_name = "project-dummy"
config = {
"project_name": project_name,
"repo_name": project_name,
"output_dir": os.getcwd(),
"python_package": project_name.replace("-", "_"),
"include_example": False,
}
with Path("config.yml").open("w") as config_file:
yaml.dump(config, config_file, default_flow_style=False)
- name: Create a new project with starter
run: kedro new --starter=./kedro-starters/pyspark-iris --config=config.yml
- name: Install project reqa
run: |
cd project-dummy
pip install -r requirements.txt
- name: Kedro run
run: kedro run