diff --git a/.github/workflows/anms-core.yaml b/.github/workflows/anms-core.yaml new file mode 100644 index 0000000..2d145dd --- /dev/null +++ b/.github/workflows/anms-core.yaml @@ -0,0 +1,54 @@ +name: Test anms-core +on: + push: + paths: + - .github/workflows/anms-core.yaml + - deps + - anms-core + +jobs: + unit-test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + pip3 install deps/anms-ace + pip3 install deps/anms-camp + - name: Install + working-directory: anms-core + run: pip3 install -e '.[test]' + - name: Run test + working-directory: anms-core + run: PYTHONPATH=src python3 -m pytest --junit-xml=testresults.xml --cov=anms test + + flake8: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + pip3 install deps/anms-ace + pip3 install deps/anms-camp + - name: Install flake8 + working-directory: anms-core + run: pip3 install -e '.[flake8]' + - name: Run flake8 + working-directory: anms-core + run: | + FAIL_SRC=0 + flake8 src || FAIL_SRC=$? diff --git a/.github/workflows/aricodec.yaml b/.github/workflows/aricodec.yaml new file mode 100644 index 0000000..7a1ed2d --- /dev/null +++ b/.github/workflows/aricodec.yaml @@ -0,0 +1,31 @@ +name: Test aricodec +on: + push: + paths: + - .github/workflows/transcoder.yaml + - deps + - aricodec + +jobs: + flake8: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + pip3 install deps/anms-ace + - name: Install flake8 + working-directory: aricodec + run: pip3 install -e '.[flake8]' + - name: Run flake8 + working-directory: aricodec + run: | + FAIL_SRC=0 + flake8 src || FAIL_SRC=$? diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index b08dd5a..7ad00b3 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -1,4 +1,4 @@ -name: Build and run unit tests +name: Run integration checkout test on: push: branches: @@ -48,92 +48,3 @@ jobs: # Checkout the running gateway+backend docker build -t checkout-test checkout-test docker run --network anms -v $PWD:/mnt -e XUNIT_OUTFILE=/mnt/testresults.xml -e CHECKOUT_BASE_URL=http://authnz/ -e SSL_CERT_FILE=/mnt/puppet/modules/apl_test/files/anms/tls/certs/ammos-ca-bundle.crt checkout-test - - anms-core_unit-test: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - pip3 install deps/anms-ace - pip3 install deps/anms-camp - - name: Install - working-directory: anms-core - run: pip3 install -e '.[test]' - - name: Run test - working-directory: anms-core - run: PYTHONPATH=src python3 -m pytest --junit-xml=testresults.xml --cov=anms test - - anms-core_flake8: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - pip3 install deps/anms-ace - pip3 install deps/anms-camp - - name: Install flake8 - working-directory: anms-core - run: pip3 install -e '.[flake8]' - - name: Run flake8 - working-directory: anms-core - run: | - FAIL_SRC=0 - flake8 src || FAIL_SRC=$? - - transcoder_flake8: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install flake8 - working-directory: transcoder - run: pip3 install -e '.[flake8]' - - name: Run flake8 - working-directory: transcoder - run: | - FAIL_SRC=0 - flake8 src || FAIL_SRC=$? - - aricodec_flake8: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - pip3 install deps/anms-ace - - name: Install flake8 - working-directory: aricodec - run: pip3 install -e '.[flake8]' - - name: Run flake8 - working-directory: aricodec - run: | - FAIL_SRC=0 - flake8 src || FAIL_SRC=$? diff --git a/.github/workflows/transcoder.yaml b/.github/workflows/transcoder.yaml new file mode 100644 index 0000000..790e0a7 --- /dev/null +++ b/.github/workflows/transcoder.yaml @@ -0,0 +1,28 @@ +name: Test transcoder +on: + push: + paths: + - .github/workflows/transcoder.yaml + - deps + - transcoder + +jobs: + flake8: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install flake8 + working-directory: transcoder + run: pip3 install -e '.[flake8]' + - name: Run flake8 + working-directory: transcoder + run: | + FAIL_SRC=0 + flake8 src || FAIL_SRC=$?