Skip to content

Commit

Permalink
Separating jobs per-project
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianSipos committed Aug 21, 2023
1 parent 9cac43d commit 86d7e8f
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 90 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/anms-core.yaml
Original file line number Diff line number Diff line change
@@ -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=$?
31 changes: 31 additions & 0 deletions .github/workflows/aricodec.yaml
Original file line number Diff line number Diff line change
@@ -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=$?
91 changes: 1 addition & 90 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and run unit tests
name: Run integration checkout test
on:
push:
branches:
Expand Down Expand Up @@ -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=$?
28 changes: 28 additions & 0 deletions .github/workflows/transcoder.yaml
Original file line number Diff line number Diff line change
@@ -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=$?

0 comments on commit 86d7e8f

Please sign in to comment.