2021-05-03 19:39:20 +00:00
|
|
|
name: TrickOps
|
|
|
|
# This workflow is triggered on pushes to the repository.
|
2024-04-01 14:43:12 +00:00
|
|
|
on: [pull_request]
|
2021-05-03 19:39:20 +00:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
trickops-tests-ubuntu:
|
2024-09-05 19:51:19 +00:00
|
|
|
name: Unit Tests Ubuntu:22.04
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
container: ubuntu:22.04
|
2021-05-03 19:39:20 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: install dependencies
|
|
|
|
# Note that perl is for trick-gte which TrickOps runs and qt and everything after it is for koviz
|
|
|
|
run: |
|
2024-09-05 19:51:19 +00:00
|
|
|
export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y git python3 python3-venv perl perl-modules-5.34 qtbase5-dev wget unzip g++ make flex bison
|
2021-05-03 19:39:20 +00:00
|
|
|
- name: create virtual environment
|
|
|
|
run: |
|
|
|
|
cd share/trick/trickops/
|
2024-12-12 16:55:18 +00:00
|
|
|
python3 -m venv .venv && source .venv/bin/activate && pip3 install --upgrade pip && pip3 install -r requirements.txt
|
2021-05-03 19:39:20 +00:00
|
|
|
- name: get and build koviz
|
|
|
|
run: |
|
|
|
|
cd /tmp/ && wget -q https://github.com/nasa/koviz/archive/refs/heads/master.zip && unzip master.zip
|
|
|
|
cd /tmp/koviz-master/ && qmake && make
|
|
|
|
- name: run unit and doc tests
|
|
|
|
run: |
|
|
|
|
cd share/trick/trickops/tests/
|
|
|
|
source ../.venv/bin/activate
|
|
|
|
export PATH="/tmp/koviz-master/bin:${PATH}"
|
|
|
|
./run_tests.py
|
2024-04-01 14:43:12 +00:00
|
|
|
- uses: actions/upload-artifact@v3.0.0
|
2021-05-03 19:39:20 +00:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: doctests
|
|
|
|
path: |
|
|
|
|
share/trick/trickops/tests/*_doctest_log.txt
|
|
|
|
/tmp/log.*
|
|
|
|
|
2022-02-25 00:13:35 +00:00
|
|
|
trickops-tests-rockylinux8:
|
|
|
|
name: Unit Tests RockyLinux8
|
2024-09-05 19:51:19 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2022-02-25 00:13:35 +00:00
|
|
|
container: rockylinux:8
|
2021-05-03 19:39:20 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: install dependencies
|
|
|
|
# Note that perl is for trick-gte which TrickOps runs and qt and everything after it is for koviz
|
|
|
|
run: |
|
|
|
|
dnf install -y git python3-devel which perl perl-Digest-MD5 qt5-qtbase-devel bison clang flex make gcc gcc-c++ wget
|
|
|
|
- name: create virtual environment
|
|
|
|
run: |
|
|
|
|
cd share/trick/trickops/
|
|
|
|
python3 -m venv .venv && source .venv/bin/activate && pip3 install -r requirements.txt
|
|
|
|
- name: get and build koviz
|
|
|
|
run: |
|
|
|
|
cd /tmp/ && wget -q https://github.com/nasa/koviz/archive/refs/heads/master.zip && unzip master.zip
|
|
|
|
cd /tmp/koviz-master/ && qmake-qt5 && make
|
|
|
|
- name: run unit and doc tests
|
|
|
|
run: |
|
|
|
|
cd share/trick/trickops/tests/
|
|
|
|
source ../.venv/bin/activate
|
|
|
|
export PATH="/tmp/koviz-master/bin:${PATH}"
|
|
|
|
./run_tests.py
|
2024-04-01 14:43:12 +00:00
|
|
|
- uses: actions/upload-artifact@v3.0.0
|
2021-05-03 19:39:20 +00:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: doctests
|
|
|
|
path: |
|
|
|
|
share/trick/trickops/tests/*_doctest_log.txt
|
|
|
|
/tmp/log.*
|
|
|
|
|
|
|
|
# TODO: ExampleWorkflow.py is not included here because it needs a built Trick
|
|
|
|
# to function correctly and I don't want to duplicate the Trick build testing
|
|
|
|
# here to provide testing of what is essentially an example provided for
|
|
|
|
# documentation purposes. If we could leverage artifacts from a previous
|
|
|
|
# stage and/or stable containers where Trick is already pre-built, we should
|
|
|
|
# consider adding ExampleWorfklow.py to testing in this file. -Jordan 4/2021
|