removed these lines from codecov as they 99.99 percent will never be … #206
Workflow file for this run
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
# Author: | |
# - Stuart McAlpine - [email protected] | |
# - Arthur Loureiro - [email protected] | |
name: DESC Smokescreen | |
# How does the workflow get triggered? | |
on: | |
# Triggers when push/pull-request made to the main branch. | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- '*' | |
# List of jobs for this workflow. | |
jobs: | |
# Our pytest job. | |
smokescreen-pytest: | |
# Our strategy lists the OS and Python versions we want to test on. | |
strategy: | |
# Don't quit all jobs if only one job fails. | |
fail-fast: false | |
matrix: | |
python-version: ["3.9"] | |
os: [ubuntu-20.04, macos-latest] | |
include: | |
- os: ubuntu-20.04 | |
INSTALL_DEPS: sudo apt-get update && sudo apt-get -y install gfortran-7 swig libopenmpi-dev openmpi-bin libopenblas-dev && sudo ln -s `which gfortran-7` /usr/local/bin/gfortran | |
- os: macos-latest | |
INSTALL_DEPS: brew update-reset && HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gcc swig libomp open-mpi openblas && if [ ! -f /usr/local/bin/gfortran ]; then ln -s /usr/local/bin/gfortran-$(brew list --versions gcc | awk '{print $2}' | cut -d. -f1) /usr/local/bin/gfortran; fi | |
# What operating system is this job running on? | |
runs-on: ${{ matrix.os }} | |
# Our CI steps for this job. | |
steps: | |
# Check out this repository code. | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
channel-priority: true | |
auto-update-conda: true | |
auto-activate-base: true | |
# # Install Python. | |
# - name: Set up Python ${{ matrix.python-version }} | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
${{ matrix.INSTALL_DEPS }} | |
conda env create -f environment.yml | |
conda activate desc_smokescreen | |
# Install our package. | |
- name: Install smokescreen | |
shell: bash -l {0} | |
run: | | |
conda activate desc_smokescreen | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
python -m pip install . | |
# Perform the unit test and outputs a coverage report | |
- name: Test with pytest | |
shell: bash -l {0} | |
run: | | |
conda activate desc_smokescreen | |
pytest --cov=smokescreen --cov-report=xml ./tests | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: LSSTDESC/Smokescreen | |
- name: flake8 | |
uses: py-actions/flake8@v2 | |
with: | |
max-line-length: "100" | |
# run: | | |
# conda activate desc_smokescreen | |
# flake8 src/smokescreen | |
# # Install our package. | |
# - name: Install legacy_blinding | |
# run: | | |
# cd legacy_blinding | |
# python -m pip install --upgrade pip | |
# python -m pip install . | |
# pytest ./tests |