Skip to content

Commit 501512f

Browse files
authored
Fix CI jobs (#230)
* Moving back SQL to add healthcheck role * Testing and operating on native RHEL-9 python v3.9 * Use newer ACE and CAMP for python 3.9 compat * workaround split Dockerfiles * wait for services healthy before test * anms-core healthcheck delay
1 parent 604991b commit 501512f

File tree

16 files changed

+12606
-13083
lines changed

16 files changed

+12606
-13083
lines changed

.github/workflows/anms-core.yaml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,8 @@ on:
77
- anms-core/**
88

99
jobs:
10-
unit-test:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v4
15-
with:
16-
submodules: recursive
17-
- name: Set up Python
18-
uses: actions/setup-python@v5
19-
with:
20-
python-version: "3.10"
21-
- name: Install dependencies
22-
run: |
23-
pip3 install deps/dtnma-ace
24-
pip3 install deps/dtnma-camp
25-
- name: Install
26-
working-directory: anms-core
27-
run: pip3 install -e '.[test]'
28-
- name: Run test
29-
working-directory: anms-core
30-
run: PYTHONPATH=src python3 -m pytest --junit-xml=testresults.xml --cov=anms test
31-
3210
flake8:
33-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
3412
steps:
3513
- name: Checkout repository
3614
uses: actions/checkout@v4
@@ -39,7 +17,7 @@ jobs:
3917
- name: Set up Python
4018
uses: actions/setup-python@v5
4119
with:
42-
python-version: "3.10"
20+
python-version: "3.9"
4321
- name: Install dependencies
4422
run: |
4523
pip3 install deps/dtnma-ace

.github/workflows/aricodec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: "3.10"
20+
python-version: "3.9"
2121
- name: Install dependencies
2222
run: |
2323
pip3 install deps/dtnma-ace

.github/workflows/build-test.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ jobs:
4646
sudo mkdir /run/anms
4747
- name: Start
4848
run: |
49-
podman compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate
50-
podman compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate
51-
sleep 5
49+
podman compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate --wait
50+
podman compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate --wait
5251
- name: Status
5352
run: |
5453
for BADSTATUS in stopped restarting; do
@@ -99,7 +98,9 @@ jobs:
9998
echo "GITHUB_WORKSPACE=${{ github.workspace }}"
10099
ls -al ${{ github.workspace }}
101100
- name: Build Main
102-
run: docker compose ${ANMS_COMPOSE_OPTS} build
101+
run: |
102+
docker compose ${ANMS_COMPOSE_OPTS} build builder-base builder-init builder-acelib
103+
docker compose ${ANMS_COMPOSE_OPTS} build
103104
- name: Build Agents
104105
run: docker compose ${TESTENV_COMPOSE_OPTS} build
105106
- name: Build Volume
@@ -108,9 +109,8 @@ jobs:
108109
sudo mkdir /run/anms
109110
- name: Start
110111
run: |
111-
docker compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate
112-
docker compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate
113-
sleep 5
112+
docker compose ${TESTENV_COMPOSE_OPTS} up -d --force-recreate --wait
113+
docker compose ${ANMS_COMPOSE_OPTS} up -d --force-recreate --wait
114114
- name: Status
115115
run: |
116116
for BADSTATUS in stopped restarting; do

.github/workflows/transcoder.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
flake8:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v4
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: "3.10"
20+
python-version: "3.9"
2121
- name: Install flake8
2222
working-directory: transcoder
2323
run: pip3 install flake8

anms-core/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ COPY --chmod=755 docker-entrypoint.sh /usr/local/bin/
4848
USER ${APP_USER}
4949
CMD ["/usr/local/bin/docker-entrypoint.sh"]
5050

51-
HEALTHCHECK --interval=60s --timeout=60s --retries=20 \
51+
HEALTHCHECK --start-period=10s --interval=60s --timeout=10s --retries=20 \
5252
CMD ["curl", "-sq", "-o/dev/null", "http://localhost:5555/hello"]

anms-ui/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ENV PM2_HOME=${APP_WORK_DIR}/.pm2
4040

4141
# Install NodeJS Global Dependencies
4242
RUN --mount=type=cache,target=/root/.cache/yarn \
43-
yarn global add pm2 @vue/cli
43+
yarn global --ignore-engines add pm2 @vue/cli
4444

4545
# Remaining commands as this user
4646
USER ${APP_USER}:${APP_USER}
@@ -79,7 +79,7 @@ COPY --chown=${APP_USER}:${APP_USER} config.yaml process.yml config_ui_env.js da
7979

8080
CMD ["pm2-docker", "process.yml", "--env", "production"]
8181

82-
HEALTHCHECK --start-period=10s --interval=60s --timeout=60s --retries=20 \
82+
HEALTHCHECK --start-period=10s --interval=60s --timeout=10s --retries=20 \
8383
CMD ["pm2", "pid", "anms"]
8484

8585
EXPOSE 9030

anms-ui/prep_packages.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ mkdir -p "/home/${USER}/.cache/yarn"
3636

3737
for SUBNAME in server public
3838
do
39+
echo -e "\n\nUpdating in ${SUBNAME}...\n"
3940
docker run \
4041
-v "/etc/group:/etc/group:ro" \
4142
-v "/etc/passwd:/etc/passwd:ro" \
4243
-v "/etc/shadow:/etc/shadow:ro" \
4344
-u ${UID}:${GID} \
44-
-v "/home/${USER}/.cache/yarn:/home/${USER}/.cache/yarn" \
45-
-v "${SELFDIR}/${SUBNAME}:/usr/src/app" \
46-
yarn-base bash -c "cd /usr/src/app && yarn install"
45+
-v "/home/${USER}/.cache/yarn:/home/${USER}/.cache/yarn:U" \
46+
-v "${SELFDIR}/${SUBNAME}:/usr/src/app:U" \
47+
yarn-base \
48+
bash -c "cd /usr/src/app && yarn install"
4749
done

anms-ui/public/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "anms-ui",
33
"version": "0.1.1",
44
"dependencies": {
5-
"@achrinza/node-ipc": "^10.1.11",
65
"@fortawesome/fontawesome-free": "^5.13.0",
76
"@fortawesome/fontawesome-svg-core": "^1.2.32",
87
"@fortawesome/free-solid-svg-icons": "^6.2.0",

0 commit comments

Comments
 (0)