Skip to content

Gh-59: Add Gremlin endpoints #66

Gh-59: Add Gremlin endpoints

Gh-59: Add Gremlin endpoints #66

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: Start road-traffic example
run: |
gafferVersion=`sed -n 's/^__version__.*"\(.*\)"$/\1/p' src/__init__.py`
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.war https://repo1.maven.org/maven2/uk/gov/gchq/gaffer/road-traffic-rest/$gafferVersion/road-traffic-rest-$gafferVersion.war
java \
-Dgaffer.storeProperties=tests/road-traffic-example/store.properties \
-Dgaffer.graph.config=tests/road-traffic-example/graphConfig.json \
-Dgaffer.schemas=tests/road-traffic-example/schema \
-DroadTraffic.dataLoader.dataPath=tests/road-traffic-example/roadTrafficSampleData.csv \
-jar jetty-runner.jar --path rest road-traffic-rest.war &
sleep 1m
- name: Run Python tests
run: |
python3 -m pip install ".[dev]"
python3 -m tox