General repository cleanup #100
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 workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python application | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
linux: | |
env: | |
PYTHONFAULTHANDLER: "true" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: false | |
activate-environment: crash-model | |
environment-file: conda-linux-64.lock | |
- name: Run linux tests | |
run: | | |
set -eo pipefail | |
conda activate crash-model | |
cd src | |
py.test --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./src/coverage.xml | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
mac: | |
env: | |
PYTHONFAULTHANDLER: "true" | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
activate-environment: crash-model | |
#environment-file: conda-osx-64.lock | |
environment-file: environment_mac.yml | |
channels: conda-forge, defaults | |
channel-priority: strict | |
- name: Run mac tests | |
run: | | |
set -eo pipefail | |
. /usr/local/miniconda/etc/profile.d/conda.sh | |
sudo chown -R $USER $CONDA | |
conda activate crash-model | |
cd src | |
pylint pipeline.py initialize_city.py data/*.py visualization/*.py data_standardization/*.py models/*.py features/*.py tools/*.py | |
py.test | |
windows: | |
env: | |
PYTHONFAULTHANDLER: "true" | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
activate-environment: crash-model | |
environment-file: conda-win-64.lock | |
- name: Run windows tests | |
shell: bash -l {0} | |
run: | | |
set -eo pipefail | |
cd src | |
pylint pipeline.py initialize_city.py data/*.py visualization/*.py data_standardization/*.py models/*.py features/*.py tools/*.py | |
py.test |