-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (62 loc) · 2.3 KB
/
continuous-integration.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Continuous Integration
on:
pull_request:
push:
branches:
- 'main'
jobs:
autopep8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: autopep8
id: autopep8
uses: peter-evans/autopep8@v1
with:
# ignore E402 rule to avoid changes that cause circular imports
args: --exit-code -r -i -a -a --max-line-length 100 --ignore E402 .
- name: Set autopep8 branch name
id: vars
run: echo ::set-output name=branch-name::"pep8patches/$GITHUB_HEAD_REF"
- name: Create Pull Request
if: steps.autopep8.outputs.exit-code == 2
uses: peter-evans/create-pull-request@v3
with:
commit-message: autopep8 action fixes
title: Fixes by autopep8 action
body: This is an auto-generated PR with fixes by autopep8.
labels: autopep8
branch: ${{ steps.vars.outputs.branch-name }}
base: ${{ github.head_ref }}
- name: Fail if autopep8 made changes
if: steps.autopep8.outputs.exit-code == 2
run: exit 1
python-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
jetty-runner.jar
road-traffic-rest-2.0.0.war
key: road-traffic-dependencies
- name: Start road-traffic example
run: |
curl -o jetty-runner.jar https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-runner/9.4.52.v20230823/jetty-runner-9.4.52.v20230823.jar
curl -o road-traffic-rest-2.0.0.war https://repo1.maven.org/maven2/uk/gov/gchq/gaffer/road-traffic-rest/2.0.0/road-traffic-rest-2.0.0.war
java \
-Dgaffer.storeProperties=src/test/road-traffic-example/store.properties \
-Dgaffer.graph.config=src/test/road-traffic-example/graphConfig.json \
-Dgaffer.schemas=src/test/road-traffic-example/schema \
-DroadTraffic.dataLoader.dataPath=src/test/road-traffic-example/roadTrafficSampleData.csv \
-jar jetty-runner.jar --path rest road-traffic-rest-2.0.0.war &
sleep 1m
- name: Run Python tests
run: python3 -m unittest discover -s src