-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update testing environment #21
Changes from 12 commits
c316428
cc98a83
33172ea
420acc4
560c32b
38c8707
5177cf4
ff69a7f
2f0d40f
52f460d
d960b14
c84d344
5f5105b
174b2aa
6eebe3d
7b36520
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,38 @@ | ||
name: Changelog update check | ||
|
||
on: | ||
# allows us to run workflows manually | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
check_changelog_update: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: alpine:3.14 | ||
Comment on lines
+14
to
+15
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. I've never used a container in GH actions. What's the function? 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. It's for running on a Docker image. I don't think this is actually needed here. I'll remove it if it isn't. 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. Still curious about this 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. It looks like the docker image is needed. It's a standard Linux environment that is minimal in size: https://hub.docker.com/_/alpine/ |
||
|
||
name: Check if Changelog has been updated | ||
steps: | ||
- name: Install latest git | ||
run: | | ||
apk add --no-cache bash git openssh | ||
git --version | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- run: | | ||
git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
cd $GITHUB_WORKSPACE | ||
git remote add arfc https://github.com/arfc/openmcyclus.git | ||
git fetch arfc | ||
change=`git diff arfc/main -- CHANGELOG.rst | wc -l` | ||
git remote remove arfc | ||
if [ $change -eq 0 ]; then | ||
echo "CHANGELOG.rst has not been updated" | ||
exit 1 | ||
fi | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
name: test-openmcyclus | ||
on: [pull_request] | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: cyclus/cycamore | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
@@ -18,35 +16,25 @@ jobs: | |
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: openmcyclus-env | ||
environment-file: environment.yml | ||
use-mamba: true | ||
|
||
- name: Conda config | ||
run: | | ||
conda config --env --set pip_interop_enabled True | ||
|
||
- name: Update Environment | ||
- name: Install dependencies | ||
run: | | ||
pip install pytest | ||
mamba env update -n openmcyclus-env -f environment.yml | ||
mamba install -y cycamore openmc scipy=1.11 pytest | ||
Comment on lines
+25
to
+27
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. Beautiful! 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. Thanks! This may not stay for long, as I'm noticing locally that when cyclus is installed locally it isn't able to find the archetype. I'll dig into this a bit more. 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. When I run the CI with the mamba build see run 129, I think it finds cyclus. So this build configuration will stay. |
||
|
||
- name: Install OpenMC cross section library | ||
run: $GITHUB_WORKSPACE/openmc-xs.bash | ||
|
||
- name: Install OpenMC from Mamba | ||
run: mamba install openmc | ||
|
||
- name: Install OpenMC cross section library | ||
run: echo "OPENMC_CROSS_SECTIONS=cross_sections.xml" >> $GITHUB_ENV | ||
run: | | ||
$GITHUB_WORKSPACE/openmc-xs.bash | ||
echo "OPENMC_CROSS_SECTIONS=cross_sections.xml" >> $GITHUB_ENV | ||
|
||
- name: Install OpenMCyclus | ||
run: | | ||
pip install . | ||
|
||
# - name: Check environment | ||
# run: | | ||
# pip install pytest | ||
|
||
# - name: Run Tests | ||
# run: | | ||
# pytest tests/integration_tests/test_depletereactor.py |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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.
So this will only run when a pull request is created. On subsequent pushes to that PR it will not run. Not sure if this is the behavior you want or not.
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.
No, it will run again if you push to the branch the PR originates from:
from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
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.
May want to add a
push
trigger