Skip to content
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

Test against dev and rc fermitools #532

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
os : ["ubuntu-latest", "macos-latest"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test-install-with-new-fermitools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
schedule:
- cron: "0 5 * * 5" #5:00 GMT every Friday (= 9PM PST Thursday = midnight EST)

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.9]
os : ["ubuntu-latest", "macos-latest"]
environment-file: ["environment-fermi-dev.yml", "environment-fermi-rc.yml"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
activate-environment: fermipy
environment-file: ${{ matrix.environment-file }}
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Install
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
python -m pip install pylint pytest
- name: Lint with pylint
shell: bash -l {0}
run: |
# stop the build if there are Python syntax errors or undefined names
#pylint --reports=no --errors-only fermipy
# stp the build if there are a lot of messages
#pylint --reports=no --fail-under=9.5 fermipy
# exit-zero treats all errors as warnings.
pylint --exit-zero fermipy
- name: Test with pytest (no codecov here)
shell: bash -l {0}
run: |
python -m pytest fermipy

15 changes: 15 additions & 0 deletions environment-fermi-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: fermipy
channels:
- fermi/label/dev
- conda-forge
dependencies:
- python
- pyyaml
- numpy>=1.16
- scipy
- astropy
- matplotlib>=3.3
- healpy
- astropy-healpix
- gammapy>=0.18
- fermitools>=2.2.0
15 changes: 15 additions & 0 deletions environment-fermi-rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: fermipy
channels:
- fermi/label/rc
- conda-forge
dependencies:
- python
- pyyaml
- numpy>=1.16
- scipy
- astropy
- matplotlib>=3.3
- healpy
- astropy-healpix
- gammapy>=0.18
- fermitools>=2.2.0