Skip to content

Gh-27: Change readme road traffic command #17

Gh-27: Change readme road traffic command

Gh-27: Change readme road traffic command #17

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