-
Notifications
You must be signed in to change notification settings - Fork 14
54 lines (52 loc) · 2.45 KB
/
.github-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# yamllint disable
---
#---------------------------------------------------------------------------------------------------
env:
TEST_TIMING_OPTION: "" # Set the option if local test should be timed or not. Default is off.
PYTHON_PACKAGE_MANAGER: "conda" # Python package manager to create the python environments
name: github_ci
on: [push]
jobs:
run_tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/4c-multiphysics/4c:latest
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
- name: build
run: |
sudo apt-get update
sudo apt-get install -y rsync
echo /home/user/4C
# ls /home/user/4C
# echo /home/user/4C/tests
# ls /home/user/4C/tests
# echo /home/user/4C/tests/input_files
# ls /home/user/4C/tests/input_files
# ln -s /home/user/4C/build/4C config/4C
# ls config/
mpirun --bind-to none -np 2 config/4C /home/user/4C/tests/input_files/solid_runtime_hex8.dat out
/usr/bin/mpirun --bind-to none -np 2 config/4C /home/user/4C/tests/input_files/solid_runtime_hex8.dat out
$PYTHON_PACKAGE_MANAGER env create -f environment.yml
$PYTHON_PACKAGE_MANAGER activate queens
pip install -e .[develop]
$PYTHON_PACKAGE_MANAGER env export > pipeline_conda_environment.yml
$PYTHON_PACKAGE_MANAGER list
#- name: codechecks
#run: |
# $PYTHON_PACKAGE_MANAGER activate queens
# isort --check-only queens tests > track_isort.txt 2>&1
# black --check queens tests > track_black.txt 2>&1
# pylint --rcfile=.pylintrc_ci queens tests | tee track_pylint.txt 2>&1
# pylint queens tests --rcfile=.pylintrc --output-format=json:pylint_warnings.json --fail-under 0
# python .gitlab/pipeline_utils/code_quality_creator.py pylint_warnings.json
# pydocstyle --match-dir='^(?!.*test).*$' queens > track_pydocstyle.txt 2>&1
- name: tests
run: |
$PYTHON_PACKAGE_MANAGER activate queens
pytest -v -m "unit_tests or integration_tests or integration_tests_fourc" --cov --cov-report=term --cov-report=html:html_coverage_report --cov-report=xml:xml_coverage_report.xml $TEST_TIMING_OPTION --color=yes --junitxml=test_junit.xml