[Chapter06] Graph Similarity with GNN #111
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Image | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| pull_request: | |
| workflow_call: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 5 | |
| matrix: | |
| chapter: | |
| - name: chap1 | |
| folder: Chapter01 | |
| - name: chap2 | |
| folder: Chapter02 | |
| - name: chap3 | |
| folder: Chapter03 | |
| - name: chap4 | |
| folder: Chapter04 | |
| - name: chap5 | |
| folder: Chapter05 | |
| - name: chap6 | |
| folder: Chapter06 | |
| - name: chap7 | |
| folder: Chapter07 | |
| - name: chap8 | |
| folder: Chapter08 | |
| - name: chap9 | |
| folder: Chapter09 | |
| - name: chap10 | |
| folder: Chapter10 | |
| runs-on: ubuntu-latest | |
| name: Image ${{ matrix.chapter.name }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Build Image | |
| id: build | |
| run: | | |
| cd docker | |
| docker build . --target ${{ matrix.chapter.name }} \ | |
| --build-arg branch=${{ steps.extract_branch.outputs.branch }} \ | |
| -t graph-machine-learning:latest --no-cache | |
| - name: Test Image | |
| id: tests | |
| env: | |
| KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | |
| KAGGLE_TOKEN: ${{ secrets.KAGGLE_TOKEN }} | |
| run: | | |
| docker network create my-network | |
| # Start Neo4j if we are testing chapter 10 | |
| if [ "${{ matrix.chapter.name }}" == "chap10" ]; | |
| then | |
| docker run --rm --detach --name neo4j \ | |
| --publish=7474:7474 --publish=7687:7687 \ | |
| --user="$(id -u):$(id -g)" \ | |
| --env NEO4J_AUTH=none \ | |
| --env NEO4J_PLUGINS='["graph-data-science"]' \ | |
| neo4j:5.26.0 | |
| docker network connect my-network neo4j | |
| fi | |
| mkdir -p data | |
| chmod -R 777 data | |
| docker run \ | |
| --rm --detach -v "$(pwd)/data:/data" \ | |
| --name graph-machine-learning-box \ | |
| --env KAGGLE_USERNAME=${KAGGLE_USERNAME} \ | |
| --env KAGGLE_KEY=${KAGGLE_TOKEN} \ | |
| --env NEO4J_HOST=neo4j \ | |
| graph-machine-learning:latest | |
| docker network connect my-network graph-machine-learning-box | |
| # Run tests | |
| cd docker | |
| ./tests.sh ${{ matrix.chapter.folder }} |