orthanc 0.8.0

Client for Orthanc REST API
Documentation
name: tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  ORC_MAIN_PORT: 8028
  ORC_PEER_PORT: 8029
  ORC_MODALITY_ONE_PORT: 8021
  ORC_MODALITY_TWO_PORT: 8022
  ORC_ORTHANC_USERNAME: orthanc
  ORC_ORTHANC_PASSWORD: orthanc
  ORC_DATAFILES_PATH: /tmp/orc_test_data

  DINO_SCP_HOST: 0.0.0.0
  DINO_SCP_PORT: 5252
  DINO_SCP_AET: DINO

jobs:
  unit_test:
    runs-on: ubuntu-latest
    name: unit_test
    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: prepare rust env
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: run tests
        run: make unit_test_coverage

      - name: upload coverage
        uses: codecov/codecov-action@v1
        with:
          flags: unit_test
          fail_ci_if_error: true

  integration_test:
    runs-on: ubuntu-latest
    name: integration_test
    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: prepare rust env
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: run tests
        run: make integration_test_coverage

      - name: upload coverage
        uses: codecov/codecov-action@v1
        with:
          flags: integration_test
          fail_ci_if_error: true

  e2e_test:
    runs-on: ubuntu-latest
    name: e2e_test
    strategy:
      matrix:
        orthanc: [1.6.1, 1.7.4, 1.8.2, 1.9.1]
    services:
      orthanc_main:
        image: jodogne/orthanc:${{ matrix.orthanc }}
        ports:
          - 8028:8042
      orthanc_peer:
        image: jodogne/orthanc:${{ matrix.orthanc }}
        ports:
          - 8029:8042
      modality_one:
        image: jodogne/orthanc:${{ matrix.orthanc }}
        ports:
          - 8021:8042
      modality_two:
        image: jodogne/orthanc:${{ matrix.orthanc }}
        ports:
          - 8022:8042
      dino:
        image: ch00k/dino
        env:
          DINO_SCP_HOST: ${{env.DINO_SCP_HOST}}
          DINO_SCP_PORT: ${{env.DINO_SCP_PORT}}
          DINO_SCP_AET: ${{env.DINO_SCP_AET}}
        ports:
          - 5252:5252

    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: prepare rust env
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: run tests
        run: make e2e_test

  e2e_test_coverage:
    runs-on: ubuntu-latest
    name: e2e_test_coverage
    services:
      orthanc_main:
        image: jodogne/orthanc:1.9.1
        ports:
          - 8028:8042
      orthanc_peer:
        image: jodogne/orthanc:1.9.1
        ports:
          - 8029:8042
      modality_one:
        image: jodogne/orthanc:1.9.1
        ports:
          - 8021:8042
      modality_two:
        image: jodogne/orthanc:1.9.1
        ports:
          - 8022:8042
      dino:
        image: ch00k/dino
        env:
          DINO_SCP_HOST: ${{env.DINO_SCP_HOST}}
          DINO_SCP_PORT: ${{env.DINO_SCP_PORT}}
          DINO_SCP_AET: ${{env.DINO_SCP_AET}}
        ports:
          - 5252:5252

    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: prepare rust env
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: run tests
        run: make e2e_test_coverage

      - name: upload coverage
        uses: codecov/codecov-action@v1
        with:
          flags: e2e_test
          fail_ci_if_error: true

  docs:
    runs-on: ubuntu-latest
    name: docs
    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: prepare rust env
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: build docs
        run: make doc