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

Added GitHub Actions #24

Merged
merged 5 commits into from
Mar 3, 2021
Merged
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
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

## Description
_Describe the bug here_

### Steps to reproduce issue
_Please provide a minimum working example (MWE) if possible_

1. …
2. …
3. …

### Current behavior

### Expected behavior


### Code versions
_List versions only if relevant_
- Python
- …
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

# Description of feature
Describe the feature here and provide some context. Under what scenario would this be useful?

# Potential solution
Can you think of ways to implement this?
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Delete the text explanations below these headers and replace them with information about your PR.

## Purpose
Explain the goal of this pull request. If it addresses an existing issue be sure to link to it. Describe the big picture of your changes here, perhaps using a bullet list if multiple changes are done to accomplish a single goal. If it accomplishes multiple goals, it may be best to create separate PR's for each.

## Type of change
What types of change is it?
_Select the appropriate type(s) that describe this PR_

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (non-backwards-compatible fix or feature)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Documentation update
- [ ] Maintenance update
- [ ] Other (please describe)

## Testing
Explain the steps needed to test the new code to verify that it does indeed address the issue and produce the expected behavior.

## Checklist
_Put an `x` in the boxes that apply._

- [ ] I have run existing tests which pass locally with my changes
- [ ] I have added new tests or examples that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation
39 changes: 39 additions & 0 deletions .github/workflows/CI_every_PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI_every_PR

# We run CI on push commits on all branches
on: [pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"] #, "macOS-latest"]
python-version: ["3.8"]

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
with:
miniconda-version: "latest"
channels: conda-forge
auto-update-conda: true
python-version: 3.8
# environment-file: environment.yml

- name: Install test environment
shell: pwsh # putting in a shell command makes for compile linking problems later
# (if you use the shell here, cannot use 'compiler' package, but mpi only seems to work with it)
run: |
bash ./install.sh test-environment
conda activate test-environment

- name: Run demo tests within WindSE
shell: pwsh
run: |
conda activate test-environment
pytest -v --cov=windse tests/test_demos.py
59 changes: 59 additions & 0 deletions .github/workflows/CI_every_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI_every_commit

# We run CI on push commits on all branches
on: [push, pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"] #, "macOS-latest"]
python-version: ["3.8"]

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
with:
miniconda-version: "latest"
channels: conda-forge
auto-update-conda: true
python-version: 3.8
# environment-file: environment.yml

- name: Install test environment
shell: pwsh # putting in a shell command makes for compile linking problems later
# (if you use the shell here, cannot use 'compiler' package, but mpi only seems to work with it)
run: |
bash ./install.sh test-environment
conda activate test-environment

# List the collected tests for debugging purposes
- name: List tests
shell: pwsh
run: |
conda activate test-environment
pytest --co

# Run all tests within WindSE, but not computationally expensive examples
- name: Run tests within WindSE
shell: pwsh
run: |
conda activate test-environment
pytest -v --cov=windse tests/test_regression.py

# Run coveralls
- name: Run coveralls
if: contains( matrix.os, 'ubuntu')
# This also works, https://github.com/AndreMiras/coveralls-python-action
#uses: AndreMiras/coveralls-python-action@develop
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
conda activate test-environment
coveralls --service=github
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.