-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
114 additions
and
155 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build and Test Fortran | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'test**' | ||
pull_request: | ||
|
||
jobs: | ||
fortran-test: | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'cmbant/camb') | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install python requirements | ||
run: python -m pip install numpy | ||
|
||
- name: Run Build and Test Script | ||
run: bash fortran/tests/run_tests.sh | ||
|
||
- name: Upload Test Files on Failure | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-output-${{ github.sha }} | ||
path: fortran/testfiles/ | ||
if-no-files-found: warn |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Python tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
python_tests: | ||
runs-on: ubuntu-latest | ||
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != 'cmbant/camb') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- name: "Latest Python 3.x" | ||
os: ubuntu-latest | ||
python-version: 3.x | ||
- name: "OS X Python 3.8" | ||
os: macos-latest | ||
python-version: 3.8 | ||
- name: "Windows Python 3.12" | ||
os: windows-latest | ||
python-version: 3.12 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
|
||
- run: ln -s $(which gfortran-14) /usr/local/bin/gfortran | ||
if: matrix.os == 'macos-latest' | ||
|
||
- name: flake8 Lint | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: py-actions/flake8@v2 | ||
with: | ||
args: --select=E713,E704,E703,E714,E10,E11,E20,E22,E23,E25,E27,E301,E302,E304,E9,F405,F406,F5,F6,F7,F8,W1,W2,W3,W6 --show-source --statistics | ||
path: camb | ||
max-line-length: "120" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python --version | ||
gfortran --version | ||
pip install -e . | ||
- name: Run tests | ||
run: | | ||
python -c "import camb; print(camb.__version__)" | ||
python -m unittest camb.tests.camb_test | ||
- name: HM code tests | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
git clone https://github.com/alexander-mead/HMcode_test_outputs.git | ||
python -m unittest camb.tests.hmcode_test |
This file was deleted.
Oops, something went wrong.
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
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
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
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
This file was deleted.
Oops, something went wrong.