Merge pull request #12 from ahnaf-tahmid-chowdhury/release-0.1.2 #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
# allows running workflows manually | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
paths: | |
- '.github/workflows/run_build_and_test.yml' | |
- 'install-nuclearkid.sh' | |
- 'tests/**' | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: 5120 | |
swap-size-mb: 2048 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-docker-images: 'true' | |
remove-codeql: 'true' | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install NuclearKid | |
run: | | |
./install-nuclearkid.sh -d ${GITHUB_WORKSPACE} \ | |
-e nuclearkid \ | |
-g ${GITHUB_WORKSPACE}/nuclearkid/G4Data \ | |
-c ${GITHUB_WORKSPACE}/nuclearkid/CrossSectionData | |
- name: Run tests | |
run: | | |
source ${GITHUB_WORKSPACE}/nuclearkid/nuclearkid | |
nuclearkid activate | |
python -m pip install pytest | |
python -m pytest -ra tests |