Skip to content

CPACS_preprocessing #2666

CPACS_preprocessing

CPACS_preprocessing #2666

name: Integration tests
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 2 * * 1' # every Monday at 2:00am
env:
CACHE_NUMBER: 0 # increase to reset cache manually
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: "3.12"
- name: Setup MiniConda3
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.12"
activate-environment: ceasiompy # This keeps the env active for all 'bash -l' steps
environment-file: environment.yml
use-mamba: true # Mamba is much faster and more reliable than Conda for solving envs
- name: Set cache date # With that, cache will be updated every day
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: /usr/share/miniconda3/envs/ceasiompy
key: ubuntu-latest-conda-${{ env.DATE }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
id: cache
- name: Update environment
run: conda env update -n ceasiompy -f environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Install ceasiompy with pip
shell: bash -l {0}
run: pip install -e .
- name: Install libGLU
run: sudo apt-get install -y libglu1-mesa-dev
- name: Install AVL
shell: bash -l {0}
run: |
installation/ubuntu/avl.sh
- name: Install SU2
shell: bash -l {0}
run: |
installation/ubuntu/su2.sh --with_mpi false
- name: Install Pentagrow
shell: bash -l {0}
run: |
installation/ubuntu/pentagrow.sh
- name: Run integration tests
shell: bash -l {0}
run: |
source ~/.bashrc
pytest -v ./tests --cov=ceasiompy --cov-report xml:coverage.xml -m "not gui"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: integrationtests
fail_ci_if_error: true
verbose: true
- name: Upload logs
uses: actions/upload-artifact@v4
with:
name: integration-test-logs
path: tests/workflow_tests/**/ceasiompy.log