-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub actions #1
Changes from all commits
6c1bce0
95bd0b2
62d31a7
9b39167
15be2b9
4fe4d3b
21b5b6c
ea7655e
c295e80
554e109
692c3e8
c8f8221
108e9e3
d6877d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 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 | ||
ln -s /home/user/4C/build/4C config/4C | ||
ln -s /home/user/4C/build/post_ensight config/post_ensight | ||
ln -s /home/user/4C/build/post_processor config/post_processor | ||
# /usr/bin/mpirun --bind-to none --use-hwthread-cpus -np 2 config/4C /home/user/4C/tests/input_files/solid_runtime_hex8.dat out | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this comment be deleted? |
||
$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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we should add the checks of the license headers. There should however already be a GitHub Action for that https://github.com/apache/skywalking-eyes |
||
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" -o log_cli=true --log-cli-level=INFO --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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ensure the conda-forge channel in our environment.yml file but if possible using
miniforge
would also enable us to use the faster mamba environment manager.